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