public ActionResult <DealReadDto> GetDealById(int id) { var dealItems = _repository.GetDealById(id); if (dealItems != null) { return(Ok(_mapper.Map <DealReadDto>(dealItems))); } return(NotFound()); }
// GET: Deal/Details/5 public async Task <IActionResult> Details(Guid id) { Deal deal = await _dealRepository.GetDealById(id); if (deal == null) { return(NotFound()); } return(View(deal)); }
public Deal GetDealById(int dealId) { return(dealRepository.GetDealById(dealId)); }
public IActionResult Get(int id) { var deal = dealRepository.GetDealById(id); return(new OkObjectResult(deal)); }