// GET: Professor/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Professor professor = _professorRepository.GetById(id); if (professor == null) { return(HttpNotFound()); } return(View(professor)); }
public Professor Get(int id) { return(_ProfessorRepository.GetById(id)); }