private IFoodDeliveryDbContext CreateDbContext() { var options = new DbContextOptionsBuilder <FoodDeliveryDbContext>() .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()) .Options; var dbContext = new FoodDeliveryDbContext(options); dbContext.SaveChanges(); return(dbContext); }
public void Commit() { _context.SaveChanges(); //UserRepository.DbContext.SaveChanges(); }