public EntityResult <BLL_Deal> GetDeal(int dealNumber) { var data = _dealRepository.Get(FilterDealNumber(dealNumber)); if (data == null) { throw new NotFoundAPIException("Deal not found"); } return(new EntityResult <BLL_Deal>(_dealTransformationManager.Transform(data))); }
public IHttpActionResult GetDeals(int id) { Deal deal = repository.Get(id); if (deal == null) { return(NotFound()); } return(Ok(deal)); }