private void SetUpManufacturerRepository(CoreAngularDemoDBContext context) { var manufacturerRepository = new ManufacturerRepository(context); _unitOfWork.Setup(u => u.SaveAsync()).Returns(() => context.SaveChangesAsync()); _unitOfWork.Setup(u => u.ManufacturerRepository).Returns(() => manufacturerRepository); }
private void SetUpUnitRepository(CoreAngularDemoDBContext context) { var unitRepository = new UnitRepository(context); _unitOfWork.Setup(u => u.SaveAsync()).Returns(() => context.SaveChangesAsync()); _unitOfWork.Setup(u => u.UnitRepository).Returns(() => unitRepository); }
public Task <int> SaveAsync() { return(_context.SaveChangesAsync()); }