using Indotalent.Data.Entities; using Microsoft.EntityFrameworkCore; namespace Indotalent.Infrastructure.Database.Demo; public static class SalesOrderCategorySeeder { public static async Task GenerateDataAsync(AppDbContext context) { if (await context.SalesOrderCategory.AnyAsync()) return; var salesOrderCategories = new List { new SalesOrderCategory { Name = "Self-Pay / Out-of-Pocket" }, new SalesOrderCategory { Name = "Private Health Insurance" }, new SalesOrderCategory { Name = "Government Insurance" }, new SalesOrderCategory { Name = "Corporate Partner / B2B" }, new SalesOrderCategory { Name = "Employee Benefit" }, new SalesOrderCategory { Name = "Charity / Pro-Bono" } }; foreach (var category in salesOrderCategories) { await context.SalesOrderCategory.AddAsync(category); } await context.SaveChangesAsync(); } }