private static async Task InsertSupplier(PublishedStatus solutionPublicationStatus = PublishedStatus.Published) { await SupplierEntityBuilder.Create() .WithId(SupplierId) .WithName(SupplierName) .WithSummary(Description) .WithSupplierUrl(Link) .WithAddress(SupplierAddress) .Build() .InsertAsync(); await SupplierContactEntityBuilder.Create() .WithId(Guid.NewGuid()) .WithSupplierId(SupplierId) .WithFirstName(SupplierContactFirstName) .WithLastName(SupplierContactLastName) .WithEmail(SupplierContactEmail) .WithPhoneNumber(SupplierContactPhoneNumber) .Build() .InsertAsync(); await CatalogueItemEntityBuilder .Create() .WithCatalogueItemId(SolutionId) .WithName(SolutionId) .WithSupplierId(SupplierId) .WithPublishedStatusId((int)solutionPublicationStatus) .Build() .InsertAsync(); await SolutionEntityBuilder.Create() .WithId(SolutionId) .Build() .InsertAsync(); }
private static async Task InsertSupplierContactAsync(SupplierContactTable supplierTable) { await SupplierContactEntityBuilder.Create() .WithId(supplierTable.Id) .WithSupplierId(supplierTable.SupplierId) .WithFirstName(supplierTable.FirstName) .WithLastName(supplierTable.LastName) .WithEmail(supplierTable.Email) .WithPhoneNumber(supplierTable.PhoneNumber) .Build() .InsertAsync(); }