//private readonly IFutureContractByIdQueryProcessor _queryProcessor; public FutureContract GetFutureContract(int id) { var contractEntity = _queryProcessor.GetContract(id); if (contractEntity == null) { throw new RootObjectNotFoundException("Broker Not Found"); } var contract = _mapper.Map <FutureContract> (contractEntity); _linkService.AddLinks(contract); return(contract); }