private static void SeedPrincipal(FlyinlineDbContext context) { for (int i = 0; i < 10; i++) { var nRes = i % SeedHelpers.Fullnames.Count; var n = (int)(i / (decimal)SeedHelpers.Fullnames.Count); string email = SeedHelpers.GetEmailFromFullName(SeedHelpers.Fullnames[nRes] + n.ToString()); context.Principal.Add( new Principal { Id = SeedHelpers.Guids[i], Username = email, SuperAdmin = (i == 0 ? true : false) } ); } }
private static void SeedUserDetails(FlyinlineDbContext context) { for (int i = 0; i < 10; i++) { var nRes = i % SeedHelpers.Fullnames.Count; var n = (int)(i / (decimal)SeedHelpers.Fullnames.Count); string email = SeedHelpers.GetEmailFromFullName(SeedHelpers.Fullnames[nRes] + n.ToString()); context.UserDetail.Add( new UserDetail { Id = SeedHelpers.Guids[i], FirstName = SeedHelpers.GetFirstNameFromFullName(SeedHelpers.Fullnames[nRes]), LastName = SeedHelpers.GetLastNameFromFullName(SeedHelpers.Fullnames[nRes]), Email = email, Username = email } ); } }