public async Task EnsureCreated() { if (!ShouldSeed()) { return; } var pharmacy = _context.Pharmacies.First(p => p.Id == 1); var pharmacyBalances = SeedPharmacyProducts(pharmacy); var warehouse = _context.Warehouses.First(w => w.Id == 1); var warehouseBalances = SeedWarehouseProducts(warehouse); await _context.AddRangeAsync(pharmacyBalances); await _context.AddRangeAsync(warehouseBalances); await _context.SaveChangesAsync(); }