private void SetupDatabase(DatabaseContext context) { context.Database.EnsureDeleted(); context.Database.EnsureCreated(); var ledger = new Models.LedgerAccount() { Name = "General Expenses", Number = 6530, Group = Enums.Group.COPIEUS, }; var officer = new Models.FinancialOfficer() { Email = "*****@*****.**", AuthenticationIdentifier = "auth0|5a84eafef5c8213cb27c27e2" // TODO: use the real test user ID }; var admin = new Models.FinancialAdministrator() { Email = "*****@*****.**", Name = "my name", AuthenticationIdentifier = new Random().Next(1000).ToString() }; context.Add(ledger as LedgerAccount); context.Add(officer as FinancialOfficer); context.Add(admin as FinancialAdministrator); context.SaveChanges(); }
private static void GenerateFinancialAdministrator(DatabaseContext context) { var profile = new Models.FinancialAdministrator() { Email = "*****@*****.**", Name = "Mr. Admin", AuthenticationIdentifier = "auth0|5aa5f80fa19e36443ed9b557" }; context.FinancialAdministrators.Add(profile); }