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 CustomerGroupSeeder
|
||||
{
|
||||
public static async Task GenerateDataAsync(AppDbContext context)
|
||||
{
|
||||
if (await context.CustomerGroup.AnyAsync()) return;
|
||||
|
||||
var customerGroups = new List<CustomerGroup>
|
||||
{
|
||||
new CustomerGroup { Name = "Individual Members" },
|
||||
new CustomerGroup { Name = "Corporate Wellness Partners" },
|
||||
new CustomerGroup { Name = "Hotel & Hospitality Guests" },
|
||||
new CustomerGroup { Name = "Professional Athletes" },
|
||||
new CustomerGroup { Name = "Senior Wellness Club" },
|
||||
new CustomerGroup { Name = "Student & University" },
|
||||
new CustomerGroup { Name = "Military & Veterans" },
|
||||
new CustomerGroup { Name = "Healthcare & Medical Referrals" },
|
||||
new CustomerGroup { Name = "Local Resident Program" },
|
||||
new CustomerGroup { Name = "Tourists & Travelers" }
|
||||
};
|
||||
|
||||
foreach (var group in customerGroups)
|
||||
{
|
||||
await context.CustomerGroup.AddAsync(group);
|
||||
}
|
||||
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user