initial commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using Indotalent.Data.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Indotalent.Infrastructure.Database.Demo;
|
||||
|
||||
public static class SalesOrderCategorySeeder
|
||||
{
|
||||
public static async Task GenerateDataAsync(AppDbContext context)
|
||||
{
|
||||
if (await context.SalesOrderCategory.AnyAsync()) return;
|
||||
|
||||
var salesOrderCategories = new List<SalesOrderCategory>
|
||||
{
|
||||
new SalesOrderCategory { Name = "Self-Pay / Out-of-Pocket" },
|
||||
new SalesOrderCategory { Name = "Private Health Insurance" },
|
||||
new SalesOrderCategory { Name = "Government Insurance" },
|
||||
new SalesOrderCategory { Name = "Corporate Partner / B2B" },
|
||||
new SalesOrderCategory { Name = "Employee Benefit" },
|
||||
new SalesOrderCategory { Name = "Charity / Pro-Bono" }
|
||||
};
|
||||
|
||||
foreach (var category in salesOrderCategories)
|
||||
{
|
||||
await context.SalesOrderCategory.AddAsync(category);
|
||||
}
|
||||
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user