コード例 #1
0
        public EnginesController(IMapper mapper, IUnitOfWork unitOfWork)
        {
            _mapper     = mapper;
            _unitOfWork = unitOfWork;

            if (unitOfWork == null)
            {
                throw new NullReferenceException(nameof(unitOfWork));
            }

            _repository = unitOfWork.EngineRepository;
        }
コード例 #2
0
 public EnginesController(IEngineRepo repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }