public ActionResult <IEnumerable <string> > Get() { try { var petShops = _petShopServices.GetAll(); return(Ok(petShops)); } catch (Exception) { return(new StatusCodeResult(500)); } }
// GET: Pet public ActionResult Index() { try { _logger.LogInformation("Action Index on Pet controller"); var pets = _petShopServices.GetAll(); return(View(pets)); } catch (Exception ex) { _logger.LogError(ex, ex.Message); return(new StatusCodeResult(500)); } }
// GET: Pet public ActionResult Index() { var pets = _petShopServices.GetAll(); return(View(pets)); }