public ActionResult Details(int?id) { if (id == null || id.HasValue == false) { return(new BadRequestResult()); } var president = _Service.GetPresidentById(id.Value); if (president == null) { return(NotFound()); } return(View(president)); }
public President Get(int id) { return(_Service.GetPresidentById(id)); }