DD.WellWorkover.Cloud/AsbCloudDb/Model/DefaultData/DefaultData.cs
2022-11-23 17:26:21 +05:00

40 lines
1.3 KiB
C#

using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
namespace AsbCloudDb.Model.DefaultData
{
internal static class DefaultContextData
{
public static IEnumerable<IEntityFiller> GetFillers()
{
var fillers = new IEntityFiller[]
{
// Order does meter
new EntityFillerUserRole(),
new EntityFillerRelationUserRoleUserRole(),
new EntityFillerPermission(),
new EntityFillerRelationUserRolePermission(),
new EntityFillerUser(),
new EntityFillerRelationUserUserRole(),
new EntityFillerCompany(),
new EntityFillerWellOperationCategory(),
new EntityFillerFileCategory(),
new EntityFillerWellSectionType(),
new EntityFillerWellType(),
new EntityFillerMeasureCategory(),
new EntityFillerCompanyType(),
new EntityFillerSubsystem(),
};
return fillers;
}
public static void Fill(ModelBuilder modelBuilder)
{
var fillers = GetFillers();
foreach (var filler in fillers)
filler.FillData(modelBuilder);
}
}
}