initial commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using Indotalent.Data.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Indotalent.Infrastructure.Database.Demo;
|
||||
|
||||
public static class MedicalRecordGroupSeeder
|
||||
{
|
||||
public static async Task GenerateDataAsync(AppDbContext context)
|
||||
{
|
||||
if (await context.MedicalRecordGroup.AnyAsync()) return;
|
||||
|
||||
var medicalGroups = new List<MedicalRecordGroup>
|
||||
{
|
||||
new MedicalRecordGroup { Name = "Family Medicine" },
|
||||
new MedicalRecordGroup { Name = "Internal Medicine" },
|
||||
new MedicalRecordGroup { Name = "Pediatrics" },
|
||||
new MedicalRecordGroup { Name = "Obstetrics & Gynecology (OB/GYN)" },
|
||||
new MedicalRecordGroup { Name = "Cardiology" },
|
||||
new MedicalRecordGroup { Name = "Dermatology" },
|
||||
new MedicalRecordGroup { Name = "Dentistry & Oral Health" },
|
||||
new MedicalRecordGroup { Name = "Emergency Medicine" },
|
||||
new MedicalRecordGroup { Name = "Urgent Care" },
|
||||
new MedicalRecordGroup { Name = "Physical Therapy & Rehab" },
|
||||
new MedicalRecordGroup { Name = "Psychiatry & Behavioral Health" },
|
||||
new MedicalRecordGroup { Name = "Occupational Health" }
|
||||
};
|
||||
|
||||
foreach (var group in medicalGroups)
|
||||
{
|
||||
await context.MedicalRecordGroup.AddAsync(group);
|
||||
}
|
||||
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user