public static void Seed(DataAccessLayer.DBContext context) { if (context.Regions.Count() <= 0) { context.Regions.Add(new Region { RegionId = 1, UniqueId = Guid.NewGuid(), Name = "Ilocos", Code = "I" }); context.Regions.Add(new Region { RegionId = 2, UniqueId = Guid.NewGuid(), Name = "Cagayan Valley", Code = "II" }); context.Regions.Add(new Region { RegionId = 3, UniqueId = Guid.NewGuid(), Name = "Central Luzon", Code = "III" }); context.Regions.Add(new Region { RegionId = 4, UniqueId = Guid.NewGuid(), Name = "CALABARZON", Code = "IV-A" }); context.Regions.Add(new Region { RegionId = 5, UniqueId = Guid.NewGuid(), Name = "MIMAROPA", Code = "IV-B" }); context.Regions.Add(new Region { RegionId = 6, UniqueId = Guid.NewGuid(), Name = "Bicol", Code = "V" }); context.Regions.Add(new Region { RegionId = 7, UniqueId = Guid.NewGuid(), Name = "Western Visayas", Code = "VI" }); context.Regions.Add(new Region { RegionId = 8, UniqueId = Guid.NewGuid(), Name = "Central Visayas", Code = "VII" }); context.Regions.Add(new Region { RegionId = 9, UniqueId = Guid.NewGuid(), Name = "Eastern Visayas", Code = "VIII" }); context.Regions.Add(new Region { RegionId = 10, UniqueId = Guid.NewGuid(), Name = "Zamboanga Peninsula", Code = "IX" }); context.Regions.Add(new Region { RegionId = 11, UniqueId = Guid.NewGuid(), Name = "Northern Mindanao", Code = "X" }); context.Regions.Add(new Region { RegionId = 12, UniqueId = Guid.NewGuid(), Name = "Davao", Code = "XI" }); context.Regions.Add(new Region { RegionId = 13, UniqueId = Guid.NewGuid(), Name = "SOCCSKSARGEN", Code = "XII" }); context.Regions.Add(new Region { RegionId = 14, UniqueId = Guid.NewGuid(), Name = "Caraga", Code = "XIII" }); context.Regions.Add(new Region { RegionId = 15, UniqueId = Guid.NewGuid(), Name = "National Capital Region", Code = "NCR" }); context.Regions.Add(new Region { RegionId = 16, UniqueId = Guid.NewGuid(), Name = "Cordillera Administrative Region", Code = "CAR" }); context.Regions.Add(new Region { RegionId = 17, UniqueId = Guid.NewGuid(), Name = "Autonomus Region in Muslim Mindanao", Code = "ARMM" }); } context.SaveChanges(); }
public static void Seed(DataAccessLayer.DBContext context) { if (context.Roles.Count() <= 0) { context.Roles.Add(new Entities.Role { Name = "Admin", UniqueId = Guid.NewGuid() }); context.Roles.Add(new Entities.Role { Name = "System Admin", UniqueId = Guid.NewGuid() }); context.Roles.Add(new Entities.Role { Name = "EndUser", UniqueId = Guid.NewGuid() }); } context.SaveChanges(); }
public static void Seed(DataAccessLayer.DBContext context) { if (context.Modules.Count() <= 0) { context.Modules.Add(new Module { ModuleId = 1, UniqueId = Guid.NewGuid(), Name = "Home-Dashboard", ModuleController = "Home", ModuleAction = "Dashboard", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 2, UniqueId = Guid.NewGuid(), Name = "modules-index", ModuleController = "modules", ModuleAction = "index", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 3, UniqueId = Guid.NewGuid(), Name = "UserRights-Update", ModuleController = "UserRights", ModuleAction = "Update", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 4, UniqueId = Guid.NewGuid(), Name = "Home-Login", ModuleController = "Home", ModuleAction = "Login", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 5, UniqueId = Guid.NewGuid(), Name = "Home-Error", ModuleController = "Home", ModuleAction = "Error", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 6, UniqueId = Guid.NewGuid(), Name = "User-Index", ModuleController = "User", ModuleAction = "Index", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 7, UniqueId = Guid.NewGuid(), Name = "KPIs-Index", ModuleController = "KPIs", ModuleAction = "Index", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 8, UniqueId = Guid.NewGuid(), Name = "Farms-Index", ModuleController = "Farms", ModuleAction = "Index", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 9, UniqueId = Guid.NewGuid(), Name = "Targets-Index", ModuleController = "Targets", ModuleAction = "Index", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 10, UniqueId = Guid.NewGuid(), Name = "Role-Index", ModuleController = "Role", ModuleAction = "Index", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 11, UniqueId = Guid.NewGuid(), Name = "RoleDetails-Update", ModuleController = "RoleDetails", ModuleAction = "Update", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 12, UniqueId = Guid.NewGuid(), Name = "RoleDetails-Get", ModuleController = "RoleDetails", ModuleAction = "Get", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 13, UniqueId = Guid.NewGuid(), Name = "Targets-Dashboard", ModuleController = "Targets", ModuleAction = "Dashboard", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 14, UniqueId = Guid.NewGuid(), Name = "UserRights-Fetch", ModuleController = "UserRights", ModuleAction = "Fetch", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 15, UniqueId = Guid.NewGuid(), Name = "RoleDetails-Fetch", ModuleController = "RoleDetails", ModuleAction = "Fetch", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 16, UniqueId = Guid.NewGuid(), Name = "UserRights-SaveDetails", ModuleController = "UserRights", ModuleAction = "SaveDetails", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 17, UniqueId = Guid.NewGuid(), Name = "RoleDetails-SaveDetails", ModuleController = "RoleDetails", ModuleAction = "SaveDetails", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 18, UniqueId = Guid.NewGuid(), Name = "KPIs-Edit", ModuleController = "KPIs", ModuleAction = "Edit", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 19, UniqueId = Guid.NewGuid(), Name = "KPIs-Details", ModuleController = "KPIs", ModuleAction = "Details", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 20, UniqueId = Guid.NewGuid(), Name = "KPIs-Delete", ModuleController = "KPIs", ModuleAction = "Delete", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 21, UniqueId = Guid.NewGuid(), Name = "KPIs-Create", ModuleController = "KPIs", ModuleAction = "Create", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 22, UniqueId = Guid.NewGuid(), Name = "Targets-Create", ModuleController = "Targets", ModuleAction = "Create", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 23, UniqueId = Guid.NewGuid(), Name = "Targets-Edit", ModuleController = "Targets", ModuleAction = "Edit", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 24, UniqueId = Guid.NewGuid(), Name = "User-Add", ModuleController = "User", ModuleAction = "Add", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 25, UniqueId = Guid.NewGuid(), Name = "User-Edit", ModuleController = "User", ModuleAction = "Edit", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 26, UniqueId = Guid.NewGuid(), Name = "Role-Add", ModuleController = "Role", ModuleAction = "Add", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 27, UniqueId = Guid.NewGuid(), Name = "Role-Edit", ModuleController = "Role", ModuleAction = "Edit", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 28, UniqueId = Guid.NewGuid(), Name = "Role-Delete", ModuleController = "Role", ModuleAction = "Delete", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 29, UniqueId = Guid.NewGuid(), Name = "User-Delete", ModuleController = "User", ModuleAction = "Delete", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 30, UniqueId = Guid.NewGuid(), Name = "Modules-Add", ModuleController = "Modules", ModuleAction = "Add", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 31, UniqueId = Guid.NewGuid(), Name = "Modules-Edit", ModuleController = "Modules", ModuleAction = "Edit", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 32, UniqueId = Guid.NewGuid(), Name = "Modules-Delete", ModuleController = "Modules", ModuleAction = "Delete", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 33, UniqueId = Guid.NewGuid(), Name = "test", ModuleController = "test", ModuleAction = "test", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 34, UniqueId = Guid.NewGuid(), Name = "targets-checkYear", ModuleController = "targets", ModuleAction = "checkYear", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 35, UniqueId = Guid.NewGuid(), Name = "Targets-Details", ModuleController = "Targets", ModuleAction = "Details", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 36, UniqueId = Guid.NewGuid(), Name = "User-UserProfile", ModuleController = "User", ModuleAction = "UserProfile", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 37, UniqueId = Guid.NewGuid(), Name = "Targets-Delete", ModuleController = "Targets", ModuleAction = "Delete", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 38, UniqueId = Guid.NewGuid(), Name = "User-EditProfile", ModuleController = "User", ModuleAction = "EditProfile", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 39, UniqueId = Guid.NewGuid(), Name = "Reports-Index", ModuleController = "Reports", ModuleAction = "Index", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 40, UniqueId = Guid.NewGuid(), Name = "Reports-Docs", ModuleController = "Reports", ModuleAction = "Docs", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 41, UniqueId = Guid.NewGuid(), Name = "Reports-getTargetYear", ModuleController = "Reports", ModuleAction = "getTargetYear", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 42, UniqueId = Guid.NewGuid(), Name = "Reports-UserDocs", ModuleController = "Reports", ModuleAction = "UserDocs", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 43, UniqueId = Guid.NewGuid(), Name = "Reports-admin", ModuleController = "Reports", ModuleAction = "admin", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 44, UniqueId = Guid.NewGuid(), Name = "KPIs-Dashboard", ModuleController = "KPIs", ModuleAction = "Dashboard", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 45, UniqueId = Guid.NewGuid(), Name = "KPIs-checkDuplicate", ModuleController = "KPIs", ModuleAction = "checkDuplicate", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 46, UniqueId = Guid.NewGuid(), Name = "kpis-checkKPIDuplicate", ModuleController = "kpis", ModuleAction = "checkKPIDuplicate", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 47, UniqueId = Guid.NewGuid(), Name = "kpis-ValidateYear", ModuleController = "kpis", ModuleAction = "ValidateYear", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 48, UniqueId = Guid.NewGuid(), Name = "targets-ValidateYear", ModuleController = "targets", ModuleAction = "ValidateYear", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 49, UniqueId = Guid.NewGuid(), Name = "Farms-Create", ModuleController = "Farms", ModuleAction = "Create", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 50, UniqueId = Guid.NewGuid(), Name = "Farms-Edit", ModuleController = "Farms", ModuleAction = "Edit", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 51, UniqueId = Guid.NewGuid(), Name = "Farms-Details", ModuleController = "Farms", ModuleAction = "Details", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 52, UniqueId = Guid.NewGuid(), Name = "Farms-Delete", ModuleController = "Farms", ModuleAction = "Delete", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 53, UniqueId = Guid.NewGuid(), Name = "Farms-GetAllLocation", ModuleController = "Farms", ModuleAction = "GetAllLocation", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 54, UniqueId = Guid.NewGuid(), Name = "Farms-Location", ModuleController = "Farms", ModuleAction = "Location", IsDeleted = false }); context.Modules.Add(new Module { ModuleId = 55, UniqueId = Guid.NewGuid(), Name = "Farms-GetAllLocationById", ModuleController = "Farms", ModuleAction = "GetAllLocationById", IsDeleted = false }); } context.SaveChanges(); }
public static void Seed(DataAccessLayer.DBContext context) { if (context.UserRoles.Count() <= 0) { context.UserRoles.Add(new UserRole { UserId = 1, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 2, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 3, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 4, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 5, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 6, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 7, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 8, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 9, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 10, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 11, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 12, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 13, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 14, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 15, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 16, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 17, RoleId = 3, IsDeleted = false }); context.UserRoles.Add(new UserRole { UserId = 18, RoleId = 2, IsDeleted = false }); } context.SaveChanges(); }
public static void Seed(DataAccessLayer.DBContext context) { if (context.RoleDetails.Count() <= 0) { context.RoleDetails.Add(new RoleDetail { Id = 1, RoleId = 3, ModuleId = 1, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 2, RoleId = 1, ModuleId = 1, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 3, RoleId = 1, ModuleId = 2, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 4, RoleId = 1, ModuleId = 3, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 5, RoleId = 2, ModuleId = 1, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 6, RoleId = 2, ModuleId = 2, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 7, RoleId = 2, ModuleId = 3, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 8, RoleId = 3, ModuleId = 2, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 9, RoleId = 3, ModuleId = 3, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 10, RoleId = 1, ModuleId = 4, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 11, RoleId = 1, ModuleId = 5, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 12, RoleId = 1, ModuleId = 6, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 13, RoleId = 1, ModuleId = 7, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 14, RoleId = 1, ModuleId = 8, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 15, RoleId = 1, ModuleId = 9, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 16, RoleId = 1, ModuleId = 10, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 17, RoleId = 1, ModuleId = 11, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 18, RoleId = 1, ModuleId = 12, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 19, RoleId = 1, ModuleId = 13, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 20, RoleId = 1, ModuleId = 14, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 21, RoleId = 1, ModuleId = 15, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 22, RoleId = 1, ModuleId = 16, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 23, RoleId = 1, ModuleId = 17, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 24, RoleId = 3, ModuleId = 4, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 25, RoleId = 3, ModuleId = 5, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 26, RoleId = 3, ModuleId = 6, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 27, RoleId = 3, ModuleId = 7, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 28, RoleId = 3, ModuleId = 8, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 29, RoleId = 3, ModuleId = 9, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 30, RoleId = 3, ModuleId = 10, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 31, RoleId = 2, ModuleId = 11, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 32, RoleId = 2, ModuleId = 12, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 33, RoleId = 2, ModuleId = 13, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 34, RoleId = 2, ModuleId = 14, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 35, RoleId = 2, ModuleId = 15, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 36, RoleId = 2, ModuleId = 16, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 37, RoleId = 2, ModuleId = 17, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 38, RoleId = 1, ModuleId = 18, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 39, RoleId = 1, ModuleId = 19, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 40, RoleId = 1, ModuleId = 20, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 41, RoleId = 1, ModuleId = 21, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 42, RoleId = 1, ModuleId = 22, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 43, RoleId = 1, ModuleId = 23, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 44, RoleId = 1, ModuleId = 24, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 45, RoleId = 1, ModuleId = 25, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 46, RoleId = 1, ModuleId = 26, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 47, RoleId = 1, ModuleId = 27, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 48, RoleId = 1, ModuleId = 28, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 49, RoleId = 1, ModuleId = 29, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 50, RoleId = 1, ModuleId = 30, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 51, RoleId = 1, ModuleId = 31, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 52, RoleId = 1, ModuleId = 32, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 53, RoleId = 1, ModuleId = 34, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 54, RoleId = 1, ModuleId = 33, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 55, RoleId = 1, ModuleId = 35, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 56, RoleId = 1, ModuleId = 36, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 57, RoleId = 1, ModuleId = 37, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 58, RoleId = 1, ModuleId = 38, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 59, RoleId = 3, ModuleId = 21, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 60, RoleId = 3, ModuleId = 22, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 61, RoleId = 3, ModuleId = 23, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 62, RoleId = 3, ModuleId = 24, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 63, RoleId = 3, ModuleId = 25, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 64, RoleId = 3, ModuleId = 26, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 65, RoleId = 3, ModuleId = 27, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 66, RoleId = 3, ModuleId = 28, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 67, RoleId = 3, ModuleId = 29, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 68, RoleId = 3, ModuleId = 30, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 69, RoleId = 1, ModuleId = 39, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 70, RoleId = 1, ModuleId = 40, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 71, RoleId = 1, ModuleId = 41, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 72, RoleId = 1, ModuleId = 42, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 73, RoleId = 1, ModuleId = 43, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 74, RoleId = 3, ModuleId = 39, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 75, RoleId = 3, ModuleId = 40, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 76, RoleId = 3, ModuleId = 41, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 77, RoleId = 3, ModuleId = 42, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 78, RoleId = 3, ModuleId = 43, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 79, RoleId = 2, ModuleId = 6, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 80, RoleId = 2, ModuleId = 41, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 81, RoleId = 2, ModuleId = 42, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 82, RoleId = 2, ModuleId = 43, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 83, RoleId = 3, ModuleId = 11, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 84, RoleId = 3, ModuleId = 12, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 85, RoleId = 3, ModuleId = 13, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 86, RoleId = 3, ModuleId = 14, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 87, RoleId = 3, ModuleId = 15, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 88, RoleId = 3, ModuleId = 16, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 89, RoleId = 3, ModuleId = 17, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 90, RoleId = 3, ModuleId = 18, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 91, RoleId = 3, ModuleId = 19, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 92, RoleId = 3, ModuleId = 20, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 93, RoleId = 3, ModuleId = 31, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 94, RoleId = 3, ModuleId = 32, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 95, RoleId = 3, ModuleId = 33, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 96, RoleId = 3, ModuleId = 34, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 97, RoleId = 3, ModuleId = 35, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 98, RoleId = 3, ModuleId = 36, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 99, RoleId = 3, ModuleId = 37, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 100, RoleId = 3, ModuleId = 38, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 101, RoleId = 2, ModuleId = 4, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 102, RoleId = 2, ModuleId = 5, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 103, RoleId = 2, ModuleId = 7, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 104, RoleId = 2, ModuleId = 8, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 105, RoleId = 2, ModuleId = 9, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 106, RoleId = 2, ModuleId = 10, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 107, RoleId = 2, ModuleId = 18, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 108, RoleId = 2, ModuleId = 19, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 109, RoleId = 2, ModuleId = 20, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 110, RoleId = 2, ModuleId = 21, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 111, RoleId = 2, ModuleId = 22, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 112, RoleId = 2, ModuleId = 23, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 113, RoleId = 2, ModuleId = 24, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 114, RoleId = 2, ModuleId = 25, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 115, RoleId = 2, ModuleId = 26, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 116, RoleId = 2, ModuleId = 27, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 117, RoleId = 2, ModuleId = 28, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 118, RoleId = 2, ModuleId = 29, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 119, RoleId = 2, ModuleId = 30, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 120, RoleId = 2, ModuleId = 31, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 121, RoleId = 2, ModuleId = 32, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 122, RoleId = 2, ModuleId = 33, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 123, RoleId = 2, ModuleId = 34, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 124, RoleId = 2, ModuleId = 35, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 125, RoleId = 2, ModuleId = 36, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 126, RoleId = 2, ModuleId = 37, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 127, RoleId = 2, ModuleId = 38, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 128, RoleId = 2, ModuleId = 39, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 129, RoleId = 2, ModuleId = 40, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 130, RoleId = 2, ModuleId = 44, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 131, RoleId = 1, ModuleId = 44, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 132, RoleId = 3, ModuleId = 44, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 133, RoleId = 2, ModuleId = 45, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 134, RoleId = 2, ModuleId = 46, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 135, RoleId = 2, ModuleId = 47, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 136, RoleId = 2, ModuleId = 48, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 137, RoleId = 1, ModuleId = 45, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 138, RoleId = 1, ModuleId = 46, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 139, RoleId = 1, ModuleId = 47, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 140, RoleId = 1, ModuleId = 48, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 141, RoleId = 3, ModuleId = 45, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 142, RoleId = 3, ModuleId = 46, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 143, RoleId = 3, ModuleId = 47, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 144, RoleId = 3, ModuleId = 48, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 145, RoleId = 2, ModuleId = 49, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 146, RoleId = 2, ModuleId = 50, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 147, RoleId = 2, ModuleId = 51, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 148, RoleId = 2, ModuleId = 52, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 149, RoleId = 2, ModuleId = 53, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 150, RoleId = 1, ModuleId = 49, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 151, RoleId = 1, ModuleId = 50, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 152, RoleId = 1, ModuleId = 51, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 153, RoleId = 1, ModuleId = 52, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 154, RoleId = 1, ModuleId = 53, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 155, RoleId = 2, ModuleId = 54, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 156, RoleId = 1, ModuleId = 54, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 157, RoleId = 3, ModuleId = 49, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 158, RoleId = 3, ModuleId = 50, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 159, RoleId = 3, ModuleId = 51, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 160, RoleId = 3, ModuleId = 52, IsAllowed = false }); context.RoleDetails.Add(new RoleDetail { Id = 161, RoleId = 3, ModuleId = 53, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 162, RoleId = 3, ModuleId = 54, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 163, RoleId = 2, ModuleId = 55, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 164, RoleId = 3, ModuleId = 55, IsAllowed = true }); context.RoleDetails.Add(new RoleDetail { Id = 165, RoleId = 1, ModuleId = 55, IsAllowed = true }); } context.SaveChanges(); }
public static void Seed(DataAccessLayer.DBContext context) { if (context.Users.Count() <= 0) { context.Users.Add(new Entities.User { UserName = "******", FirstName = "User1", Password = "******", Region = 1, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User2", Password = "******", Region = 2, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User3", Password = "******", Region = 3, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User4", Password = "******", Region = 4, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User5", Password = "******", Region = 5, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User6", Password = "******", Region = 6, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User7", Password = "******", Region = 7, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User8", Password = "******", Region = 8, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User9", Password = "******", Region = 9, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User10", Password = "******", Region = 10, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User11", Password = "******", Region = 11, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User12", Password = "******", Region = 12, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User13", Password = "******", Region = 13, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User14", Password = "******", Region = 14, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User15", Password = "******", Region = 15, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User16", Password = "******", Region = 16, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "User17", Password = "******", Region = 17, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); context.Users.Add(new Entities.User { UserName = "******", FirstName = "Admin", Password = "******", Region = 1, Email = "*****@*****.**", ContactNumber = "09000000", IsDeleted = false, UniqueId = Guid.NewGuid() }); } context.SaveChanges(); }