示例#1
0
        public ActionResult <DealReadDto> GetDealById(int id)
        {
            var dealItems = _repository.GetDealById(id);

            if (dealItems != null)
            {
                return(Ok(_mapper.Map <DealReadDto>(dealItems)));
            }
            return(NotFound());
        }
示例#2
0
        // 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));
        }
示例#3
0
 public Deal GetDealById(int dealId)
 {
     return(dealRepository.GetDealById(dealId));
 }
        public IActionResult Get(int id)
        {
            var deal = dealRepository.GetDealById(id);

            return(new OkObjectResult(deal));
        }