public ActionResult Delete(int id) { if (id == null) { return(RedirectToAction("GetAllManagers")); } if (!(_managerRepository.Exists(id))) { return(RedirectToAction("GetAllManagers")); } //USING LINQ return(View(_managerRepository.GetManagerById(id))); }