示例#1
0
 // 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));
     }
 }
示例#2
0
 public ActionResult <string> Get(int id)
 {
     try
     {
         var petShop = _petShopServices.Read(id);
         return(Ok(petShop));
     }
     catch (Exception)
     {
         return(new StatusCodeResult(500));
     }
 }
示例#3
0
        // GET: Pet/Details/5
        public ActionResult Details(int id)
        {
            var petShop = _petShopServices.Read(id);

            return(View(petShop));
        }