private void CreateEditions() { var defaultEdition = _context.Editions.IgnoreQueryFilters().FirstOrDefault(e => e.Name == EditionManager.DefaultEditionName); if (defaultEdition == null) { defaultEdition = new Edition { Name = EditionManager.DefaultEditionName, DisplayName = EditionManager.DefaultEditionName }; _context.Editions.Add(defaultEdition); _context.SaveChanges(); /* Add desired features to the standard edition, if wanted... */ } }
public void Create() { new DefaultEditionCreator(_context).Create(); new DefaultLanguagesCreator(_context).Create(); new DefaultSettingsCreator(_context).Create(); _context.SaveChanges(); }
private void AddLanguageIfNotExists(ApplicationLanguage language) { if (_context.Languages.IgnoreQueryFilters().Any(l => l.TenantId == language.TenantId && l.Name == language.Name)) { return; } _context.Languages.Add(language); _context.SaveChanges(); }
private void AddSettingIfNotExists(string name, string value, int?tenantId = null) { if (_context.Settings.IgnoreQueryFilters().Any(s => s.Name == name && s.TenantId == tenantId && s.UserId == null)) { return; } _context.Settings.Add(new Setting(tenantId, null, name, value)); _context.SaveChanges(); }
private void CreateDefaultTenant() { // Default tenant var defaultTenant = _context.Tenants.IgnoreQueryFilters().FirstOrDefault(t => t.TenancyName == AbpTenantBase.DefaultTenantName); if (defaultTenant != null) { return; } defaultTenant = new Tenant(AbpTenantBase.DefaultTenantName, AbpTenantBase.DefaultTenantName); var defaultEdition = _context.Editions.IgnoreQueryFilters().FirstOrDefault(e => e.Name == EditionManager.DefaultEditionName); if (defaultEdition != null) { defaultTenant.EditionId = defaultEdition.Id; } _context.Tenants.Add(defaultTenant); _context.SaveChanges(); }
private void CreateRolesAndUsers() { // Admin role var allRoles = _context.Roles.IgnoreQueryFilters().ToList(); var adminRole = new Role(); var coachRole = new Role(); var boosterRole = new Role(); if (allRoles.Count == 0) { //admin role adminRole = _context.Roles.Add(new Role(_tenantId, StaticRoleNames.Admin, StaticRoleNames.Admin) { IsStatic = true }).Entity; _context.SaveChanges(); //coach role coachRole = _context.Roles.Add(new Role(_tenantId, StaticRoleNames.Coach, StaticRoleNames.Coach) { IsStatic = true }).Entity; _context.SaveChanges(); //player role boosterRole = _context.Roles.Add(new Role(_tenantId, StaticRoleNames.Booster, StaticRoleNames.Booster) { IsStatic = true }).Entity; _context.SaveChanges(); } else { adminRole = allRoles.FirstOrDefault(m => m.Id == 1) ?? new Role(); coachRole = allRoles.FirstOrDefault(m => m.Id == 2) ?? new Role(); boosterRole = allRoles.FirstOrDefault(m => m.Id == 3) ?? new Role(); } // Grant all permissions to admin role var grantedPermissions = _context.Permissions.IgnoreQueryFilters().OfType <RolePermissionSetting>().Where(p => p.TenantId == _tenantId && p.RoleId == adminRole.Id).Select(p => p.Name).ToList(); var permissions = PermissionFinder.GetAllPermissions(new EloBoostAuthorizationProvider()).Where(p => p.MultiTenancySides.HasFlag(MultiTenancySides.Tenant) && !grantedPermissions.Contains(p.Name)).ToList(); if (permissions.Any()) { _context.Permissions.AddRange(permissions.Select(permission => new RolePermissionSetting { TenantId = _tenantId, Name = permission.Name, IsGranted = true, RoleId = adminRole.Id })); _context.SaveChanges(); } // Grant all permissions to admin role grantedPermissions = _context.Permissions.IgnoreQueryFilters().OfType <RolePermissionSetting>().Where(p => p.TenantId == _tenantId && (p.RoleId == boosterRole.Id || p.RoleId == coachRole.Id)).Select(p => p.Name).ToList(); if (!grantedPermissions.Any()) { _context.Permissions.Add(new RolePermissionSetting { TenantId = _tenantId, Name = PermissionNames.PagesSelect, IsGranted = true, RoleId = coachRole.Id }); _context.Permissions.Add(new RolePermissionSetting { TenantId = _tenantId, Name = PermissionNames.PagesSelect, IsGranted = true, RoleId = boosterRole.Id }); _context.SaveChanges(); } // users var firstUser = _context.Users.IgnoreQueryFilters().FirstOrDefault(); if (firstUser != null) { return; } var defaultUsers = new List <DefaultUsers> { new DefaultUsers { Username = "******", Email = "*****@*****.**", Passsword = "Elo.Boost!v1", UserType = UserType.Admin, RoleId = adminRole.Id }, new DefaultUsers { Username = "******", Email = "*****@*****.**", Passsword = "123qwe", UserType = UserType.Admin, RoleId = adminRole.Id }, new DefaultUsers { Username = "******", Email = "*****@*****.**", Passsword = "123qwe", UserType = UserType.Coach, RoleId = coachRole.Id }, new DefaultUsers { Username = "******", Email = "*****@*****.**", Passsword = "123qwe", UserType = UserType.Booster, RoleId = boosterRole.Id }, new DefaultUsers { Username = "******", Email = "*****@*****.**", Passsword = "123qwe", UserType = UserType.User } }; //insert users foreach (var item in defaultUsers) { firstUser = User.CreateTenantAdminUser(item.Username, item.Email, item.UserType); firstUser.Password = new PasswordHasher <User>(new OptionsWrapper <PasswordHasherOptions>(new PasswordHasherOptions())).HashPassword(firstUser, item.Passsword); //save _context.Users.Add(firstUser); _context.SaveChanges(); if (item.RoleId == 0) { continue; } // Assign Admin role to user _context.UserRoles.Add(new UserRole(_tenantId, firstUser.Id, item.RoleId)); _context.SaveChanges(); } }
private void CreateDefaultPrices() { var price = _context.Prices.IgnoreQueryFilters().FirstOrDefault(); if (price != null) { return; } //add LeaguePoints.Lp0 prices _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp0, Order = 1, Price = 40 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp0, Order = 2, Price = 40 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp0, Order = 3, Price = 40 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp0, Order = 4, Price = 40 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp0, Order = 5, Price = 40 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp0, Order = 6, Price = 43 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp0, Order = 7, Price = 48 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp0, Order = 8, Price = 48 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp0, Order = 9, Price = 48 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp0, Order = 10, Price = 48 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp0, Order = 11, Price = 52 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp0, Order = 12, Price = 59 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp0, Order = 13, Price = 59 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp0, Order = 14, Price = 59 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp0, Order = 15, Price = 59 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp0, Order = 16, Price = 64 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp0, Order = 17, Price = 70 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp0, Order = 18, Price = 70 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp0, Order = 19, Price = 70 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp0, Order = 20, Price = 70 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp0, Order = 21, Price = 90 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp0, Order = 22, Price = 112 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp0, Order = 23, Price = 125 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp0, Order = 24, Price = 140 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp0, Order = 25, Price = 156 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Master, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp0, Order = 26, Price = 280 }); //add LeaguePoints.Lp1 prices _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp1, Order = 1, Price = 26 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp1, Order = 2, Price = 26 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp1, Order = 3, Price = 26 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp1, Order = 4, Price = 26 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp1, Order = 5, Price = 26 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp1, Order = 6, Price = 29 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp1, Order = 7, Price = 31 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp1, Order = 8, Price = 31 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp1, Order = 9, Price = 31 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp1, Order = 10, Price = 31 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp1, Order = 11, Price = 34 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp1, Order = 12, Price = 43 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp1, Order = 13, Price = 43 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp1, Order = 14, Price = 43 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp1, Order = 15, Price = 43 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp1, Order = 16, Price = 48 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp1, Order = 17, Price = 52 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp1, Order = 18, Price = 52 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp1, Order = 19, Price = 52 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp1, Order = 20, Price = 52 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp1, Order = 21, Price = 70 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp1, Order = 22, Price = 92 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp1, Order = 23, Price = 103 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp1, Order = 24, Price = 108 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp1, Order = 25, Price = 114 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Master, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp1, Order = 26, Price = 235 }); //add LeaguePoints.Lp2 prices _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp2, Order = 1, Price = 18 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp2, Order = 2, Price = 18 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp2, Order = 3, Price = 18 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp2, Order = 4, Price = 18 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp2, Order = 5, Price = 18 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp2, Order = 6, Price = 21 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp2, Order = 7, Price = 22 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp2, Order = 8, Price = 22 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp2, Order = 9, Price = 22 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp2, Order = 10, Price = 22 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp2, Order = 11, Price = 26 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp2, Order = 12, Price = 32 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp2, Order = 13, Price = 32 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp2, Order = 14, Price = 32 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp2, Order = 15, Price = 32 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp2, Order = 16, Price = 37 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp2, Order = 17, Price = 43 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp2, Order = 18, Price = 43 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp2, Order = 19, Price = 43 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp2, Order = 20, Price = 43 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp2, Order = 21, Price = 64 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp2, Order = 22, Price = 80 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp2, Order = 23, Price = 92 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp2, Order = 24, Price = 97 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp2, Order = 25, Price = 103 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Master, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp2, Order = 26, Price = 225 }); //add LeaguePoints.Lp3 prices _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp3, Order = 1, Price = 16 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp3, Order = 2, Price = 16 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp3, Order = 3, Price = 16 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp3, Order = 4, Price = 16 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Bronze, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp3, Order = 5, Price = 16 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp3, Order = 6, Price = 19 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp3, Order = 7, Price = 21 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp3, Order = 8, Price = 21 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp3, Order = 9, Price = 21 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Silver, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp3, Order = 10, Price = 21 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp3, Order = 11, Price = 24 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp3, Order = 12, Price = 31 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp3, Order = 13, Price = 31 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp3, Order = 14, Price = 31 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Gold, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp3, Order = 15, Price = 31 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp3, Order = 16, Price = 35 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp3, Order = 17, Price = 40 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp3, Order = 18, Price = 40 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp3, Order = 19, Price = 40 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Platinum, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp3, Order = 20, Price = 40 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division5, PointsPerMatch = LeaguePoints.Lp3, Order = 21, Price = 60 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division4, PointsPerMatch = LeaguePoints.Lp3, Order = 22, Price = 80 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division3, PointsPerMatch = LeaguePoints.Lp3, Order = 23, Price = 92 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division2, PointsPerMatch = LeaguePoints.Lp3, Order = 24, Price = 97 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Diamond, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp3, Order = 25, Price = 103 }); _context.Prices.Add(new Prices { LeagueType = LeagueTypes.Master, DivisionType = DivisionTypes.Division1, PointsPerMatch = LeaguePoints.Lp3, Order = 26, Price = 180 }); //save changes _context.SaveChanges(); }