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 VendorGroupSeeder
|
||||
{
|
||||
public static async Task GenerateDataAsync(AppDbContext context)
|
||||
{
|
||||
if (await context.VendorGroup.AnyAsync()) return;
|
||||
|
||||
var vendorGroups = new List<VendorGroup>
|
||||
{
|
||||
new VendorGroup { Name = "Skincare & Professional Cosmetics" },
|
||||
new VendorGroup { Name = "Spa Equipment & Furniture" },
|
||||
new VendorGroup { Name = "Fitness & Gym Machinery" },
|
||||
new VendorGroup { Name = "Nutritional & Dietary Supplements" },
|
||||
new VendorGroup { Name = "Essential Oils & Aromatherapy" },
|
||||
new VendorGroup { Name = "Linen, Towels & Uniforms" },
|
||||
new VendorGroup { Name = "Cleaning & Hygiene Chemicals" },
|
||||
new VendorGroup { Name = "Facility Maintenance & Technical" },
|
||||
new VendorGroup { Name = "IT & Software Services" },
|
||||
new VendorGroup { Name = "Marketing & Branding Agencies" }
|
||||
};
|
||||
|
||||
foreach (var group in vendorGroups)
|
||||
{
|
||||
await context.VendorGroup.AddAsync(group);
|
||||
}
|
||||
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user