using Indotalent.Data.Entities; using Microsoft.EntityFrameworkCore; namespace Indotalent.Infrastructure.Database.Demo; public static class EmployeeCategorySeeder { public static async Task GenerateDataAsync(AppDbContext context) { if (await context.EmployeeCategory.AnyAsync()) return; var employeeCategories = new List { new EmployeeCategory { Name = "Front of House" }, new EmployeeCategory { Name = "Back of House" } }; foreach (var category in employeeCategories) { await context.EmployeeCategory.AddAsync(category); } await context.SaveChangesAsync(); } }