Files
2026-07-21 14:35:37 +07:00

33 lines
1.2 KiB
C#

using Indotalent.Data.Entities;
using Microsoft.EntityFrameworkCore;
namespace Indotalent.Infrastructure.Database.Demo;
public static class EmployeeGroupSeeder
{
public static async Task GenerateDataAsync(AppDbContext context)
{
if (await context.EmployeeGroup.AnyAsync()) return;
var employeeGroups = new List<EmployeeGroup>
{
new EmployeeGroup { Name = "Sales & Membership Advisors" },
new EmployeeGroup { Name = "Front Desk & Guest Services" },
new EmployeeGroup { Name = "Licensed Massage Therapists" },
new EmployeeGroup { Name = "Professional Estheticians" },
new EmployeeGroup { Name = "Certified Personal Trainers" },
new EmployeeGroup { Name = "Group Exercise Instructors" },
new EmployeeGroup { Name = "Holistic Wellness Coaches" },
new EmployeeGroup { Name = "Clinical Physical Therapists" },
new EmployeeGroup { Name = "Facility & Operations Team" },
new EmployeeGroup { Name = "Executive Management Team" }
};
foreach (var group in employeeGroups)
{
await context.EmployeeGroup.AddAsync(group);
}
await context.SaveChangesAsync();
}
}