33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
using Indotalent.Data.Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Indotalent.Infrastructure.Database.Demo;
|
|
|
|
public static class VendorGroupSeeder
|
|
{
|
|
public static async Task GenerateDataAsync(AppDbContext context)
|
|
{
|
|
if (await context.VendorGroup.AnyAsync()) return;
|
|
|
|
var vendorGroups = new List<VendorGroup>
|
|
{
|
|
new VendorGroup { Name = "Pharmaceuticals & Medications" },
|
|
new VendorGroup { Name = "Medical Equipment & Instruments" },
|
|
new VendorGroup { Name = "Laboratory Supplies & Reagents" },
|
|
new VendorGroup { Name = "Consumables & Disposables" },
|
|
new VendorGroup { Name = "Medical Waste Management" },
|
|
new VendorGroup { Name = "Uniforms & Medical Linens" },
|
|
new VendorGroup { Name = "Cleaning & Hygiene Supplies" },
|
|
new VendorGroup { Name = "Facility Maintenance Services" },
|
|
new VendorGroup { Name = "IT & Software Services" },
|
|
new VendorGroup { Name = "Office & Administrative Supplies" }
|
|
};
|
|
|
|
foreach (var group in vendorGroups)
|
|
{
|
|
await context.VendorGroup.AddAsync(group);
|
|
}
|
|
|
|
await context.SaveChangesAsync();
|
|
}
|
|
} |