private async static Task SeedEmployee(EmployeeDbContext dbContext) { if (!await dbContext.Employees.AnyAsync()) { var employee = employeeBuilder.BuildListOfEmployees(); dbContext.Employees.AddRange(employee); dbContext.SaveChanges(); } }
private async static Task SeedEmployee(EmployeeDbContext dbContext) { if (!await dbContext.Employees.AnyAsync()) { var employee = employeeBuilder.BuildListOfEmployees(); dbContext.Employees.AddRange(employee); dbContext.SaveChanges(); } }