initial commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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 = "Preferred Partner" },
|
||||
new VendorCategory { Name = "Exclusive Distributor" },
|
||||
new VendorCategory { Name = "Direct Manufacturer" },
|
||||
new VendorCategory { Name = "Boutique / Artisan Provider" },
|
||||
new VendorCategory { Name = "Wholesale Supplier" },
|
||||
new VendorCategory { Name = "Authorized Reseller" },
|
||||
new VendorCategory { Name = "Local Provider" },
|
||||
new VendorCategory { Name = "Regional Provider" },
|
||||
new VendorCategory { Name = "National Provider" },
|
||||
new VendorCategory { Name = "International / Global Provider" }
|
||||
};
|
||||
|
||||
foreach (var category in vendorCategories)
|
||||
{
|
||||
await context.VendorCategory.AddAsync(category);
|
||||
}
|
||||
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user