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