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 = "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();
|
|
}
|
|
} |