public RestaurantControllerTest() { dbContextOptions = new DbContextOptionsBuilder <RestaurantContext>() .UseInMemoryDatabase(databaseName: "in-memory") .Options; using (var dbContext = new RestaurantContext(dbContextOptions)) { dbContext.AddRange(GetFakeData()); dbContext.SaveChanges(); } logger = new Mock <ILogger <RestaurantController> >().Object; }