public EnginesController(IMapper mapper, IUnitOfWork unitOfWork) { _mapper = mapper; _unitOfWork = unitOfWork; if (unitOfWork == null) { throw new NullReferenceException(nameof(unitOfWork)); } _repository = unitOfWork.EngineRepository; }
public EnginesController(IEngineRepo repository, IMapper mapper) { _repository = repository; _mapper = mapper; }