initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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<SalesOrderGroup>
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user