public IActionResult Get(int id) { try { Character character = null; character = _characterRepo.GetCharacter(id); if (character != null) { return(Ok(character)); } else { return(NotFound("Character with Id = " + id.ToString() + " not found to display.")); } } catch (Exception ex) { return(BadRequest(ex)); } }
// GET: Characters/Details/5 public ActionResult Details(int id) { return(View(_characterRepo.GetCharacter(id))); }