public IActionResult GetPuppyById(int id) { Puppy puppy = puppyDao.GetPuppy(id); if (puppy == null) { return(NotFound()); } else { return(new JsonResult(puppy)); } }
// GET: Puppies/Details/1 public ActionResult Detail(int id) { try { #if DEBUG _logger.LogInformation("GET Puppies/Details/{0} called", id); // TODO: Implement full logging solution when building production app #endif return(View(_puppyDao.GetPuppy(id))); } catch (Exception ex) { _logger.LogError(ex, "{0} - {1}", "Puppies/Details/Id", ex.Message); return(View()); } }
public IActionResult Detail(int id) { Puppy puppy = puppyDao.GetPuppy(id); return(View(puppy)); }