// GET: Ad/Details/5 public ActionResult Details(int id) { try { var ad = _getOneCommand.Execute(id); return(View(ad)); } catch (Exception) { return(View()); } }
public IActionResult Get(int id) { try { var adDto = _getOneCommand.Execute(id); return(Ok(adDto)); } catch (EntityNotFoundException) { return(NotFound()); } }