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 CustomerCategorySeeder
|
|
{
|
|
public static async Task GenerateDataAsync(AppDbContext context)
|
|
{
|
|
if (await context.CustomerCategory.AnyAsync()) return;
|
|
|
|
var customerCategories = new List<CustomerCategory>
|
|
{
|
|
new CustomerCategory { Name = "Platinum Elite" },
|
|
new CustomerCategory { Name = "Gold Premium" },
|
|
new CustomerCategory { Name = "Silver Standard" },
|
|
new CustomerCategory { Name = "VIP Executive" },
|
|
new CustomerCategory { Name = "Influencer & Ambassador" },
|
|
new CustomerCategory { Name = "Family Plan" },
|
|
new CustomerCategory { Name = "Seasonal Member" },
|
|
new CustomerCategory { Name = "Trial / Guest" },
|
|
new CustomerCategory { Name = "Rehabilitative Patient" },
|
|
new CustomerCategory { Name = "Weekend Warrior" }
|
|
};
|
|
|
|
foreach (var category in customerCategories)
|
|
{
|
|
await context.CustomerCategory.AddAsync(category);
|
|
}
|
|
|
|
await context.SaveChangesAsync();
|
|
}
|
|
} |