public ActionResult study(int?id) { ViewBag.studies = "active"; if (id != null) { var study = _studyService.GetAll().First(x => x.ID == id.Value); return(View(study)); } return(RedirectToAction("studies")); }
public ActionResult Index() { Dashboard dashboard = new Dashboard { NumberOfColleges = _collegeService.GetAll().Count(), NumberOfCourses = _courseService.GetAll().Count(), NumberOfDepartment = _departmentService.GetAll().Count(), NumberOfLecturers = _lecturerService.GetAll().Count(), NumberOfStudents = _studentService.GetAll().Count(), NumberOfStudies = _studyService.GetAll().Count() }; return(View(dashboard)); }