public static GameStoreDbContext Create() { var options = new DbContextOptionsBuilder <GameStoreDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; var context = new GameStoreDbContext(options); context.Database.EnsureCreated(); context.SeedData(); context.SaveChanges(); return(context); }