public partial class AddCustomerDataPacket : FlexiFlowDataPacketBridge
public async Task IsUnique()
//If any validation fails, uncomment and use the below line of code to add error to the packet
//this.AddError("key", "ErrorMessage");
_connectionProvider.ConfigureDbConnectionString(this.InputParams.HostContextInfo);
_repo.InitializeConnection(_connectionProvider);
var custId = _repo.FindAll<Customer>().Where(c => c.Name == this.InputParams.Model.Name).Select(s => s.Id).FirstOrDefault();
this.AddError("Name", quot;Duplicate {this.InputParams.Model.Name} Customer found");
await Task.CompletedTask; //If you have any await in the validation, remove this line