// GET: Pet/Details/5 public ActionResult Details(int id) { try { _logger.LogInformation("Action HttpGet Details on Pet controller"); var petShop = _petShopServices.Read(id); return(View(petShop)); } catch (Exception ex) { _logger.LogError(ex, ex.Message); return(new StatusCodeResult(500)); } }
public ActionResult <string> Get(int id) { try { var petShop = _petShopServices.Read(id); return(Ok(petShop)); } catch (Exception) { return(new StatusCodeResult(500)); } }
// GET: Pet/Details/5 public ActionResult Details(int id) { var petShop = _petShopServices.Read(id); return(View(petShop)); }