示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 public Task <int> SaveAsync()
 {
     return(_context.SaveChangesAsync());
 }