public UnitOfWorkSerialization(
     ISerializer serializer,
     IOrdersRepository orders,
     IProductsCategoriesRepository categories,
     IProductsRepository products,
     IStagesRepository stages
     )
 {
     _serializer = serializer;
     Orders      = orders;
     Categories  = categories;
     Products    = products;
     Stages      = stages;
 }
Example #2
0
 public UnitOfWork(
     IShopDbContext context,
     IOrdersRepository orders,
     IProductsCategoriesRepository categories,
     IProductsRepository products,
     IStagesRepository stages
     )
 {
     _context    = context;
     Orders      = orders;
     Categories  = categories;
     Products    = products;
     Stages      = stages;
     _isDisposed = false;
 }
        private void Dispose(bool isDisposing)
        {
            if (_isDisposed)
            {
                return;
            }

            if (isDisposing)
            {
                Orders     = null;
                Categories = null;
                Products   = null;
                Stages     = null;
            }

            _serializer = null;
            _isDisposed = true;
        }
Example #4
0
        private void Dispose(bool isDisposing)
        {
            if (_isDisposed)
            {
                return;
            }

            if (isDisposing)
            {
                Orders     = null;
                Categories = null;
                Products   = null;
                Stages     = null;
            }

            _context.Dispose();
            _context    = null;
            _isDisposed = true;
        }
Example #5
0
 public StageController(IStagesRepository stageRepository, IMapper mapper)
 {
     _stageRepository = stageRepository;
     _mapper          = mapper;
 }