private async Task CreateSuppliers(EnvironmentSeed seed, string token) { // Create Suppliers and necessary user groups and security profile assignments foreach (HSSupplier supplier in seed.Suppliers) { var exists = await SupplierExistsAsync(supplier.Name, token); if (!exists) { await _supplierCommand.Create(supplier, token, isSeedingEnvironment : true); } } }
public async Task <HSSupplier> Create([FromBody] HSSupplier supplier) { return(await _command.Create(supplier, UserContext.AccessToken)); }