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 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user