using Indotalent.Data.Entities; using Microsoft.EntityFrameworkCore; namespace Indotalent.Infrastructure.Database.Demo; public static class SalesOrderGroupSeeder { public static async Task GenerateDataAsync(AppDbContext context) { if (await context.SalesOrderGroup.AnyAsync()) return; var salesOrderGroups = new List { new SalesOrderGroup { Name = "Inpatient" }, new SalesOrderGroup { Name = "Outpatient" }, new SalesOrderGroup { Name = "Emergency Care" }, new SalesOrderGroup { Name = "Telemedicine" }, new SalesOrderGroup { Name = "Medical Check-Up" }, new SalesOrderGroup { Name = "Home Care Services" }, new SalesOrderGroup { Name = "Day Care / Day Surgery" } }; foreach (var group in salesOrderGroups) { await context.SalesOrderGroup.AddAsync(group); } await context.SaveChangesAsync(); } }