public MemContext() { var account = new Account { Id = 1, Name = "My Test Account", Paid = true, PaidUtc = new DateTime(2016, 1, 1), AccountType = AccountType.Gold }; Accounts.Add(account); var user = new User { Id = 1, Name = "Joe User", AccountId = 1, Account = account, Active = true }; Users.Add(user); account.Users = new List <User> { user }; var account2 = new Account { Id = 2, Name = "Another Test Account", Paid = false, AccountType = AccountType.Silver }; Accounts.Add(account2); var user2 = new User { Id = 2, Name = "Late Paying User", AccountId = 2, Account = account2 }; Users.Add(user2); MutateMes.Add(new MutateMe { Id = 1, Value = 0, }); account2.Users = new List <User> { user2 }; Heros.AddRange(StarWarsTestSchema.CreateData()); }
private static void InitializeCharacterSchema(GraphQLSchema <MemContext> schema) { StarWarsTestSchema.Create(schema, db => db.Heros.AsQueryable()); }