33 lines
1.3 KiB
C#
33 lines
1.3 KiB
C#
using Indotalent.Data.Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Indotalent.Infrastructure.Database.Demo;
|
|
|
|
public static class VendorCategorySeeder
|
|
{
|
|
public static async Task GenerateDataAsync(AppDbContext context)
|
|
{
|
|
if (await context.VendorCategory.AnyAsync()) return;
|
|
|
|
var vendorCategories = new List<VendorCategory>
|
|
{
|
|
new VendorCategory { Name = "Principal Manufacturer" },
|
|
new VendorCategory { Name = "Authorized Medical Distributor" },
|
|
new VendorCategory { Name = "Local Pharmacy Partner" },
|
|
new VendorCategory { Name = "Clinical Service Provider" },
|
|
new VendorCategory { Name = "General Wholesale Supplier" },
|
|
new VendorCategory { Name = "Emergency Medical Supplier" },
|
|
new VendorCategory { Name = "Maintenance & Support Vendor" },
|
|
new VendorCategory { Name = "Government Health Agency" },
|
|
new VendorCategory { Name = "Contracted Service Provider" },
|
|
new VendorCategory { Name = "Outsourced Diagnostic Center" }
|
|
};
|
|
|
|
foreach (var category in vendorCategories)
|
|
{
|
|
await context.VendorCategory.AddAsync(category);
|
|
}
|
|
|
|
await context.SaveChangesAsync();
|
|
}
|
|
} |