public ActionResult EditCouDetails(int id) { if (Session["UserId"] != null && Session["Accountid"] != null) { CourseRepo CouRepo = new CourseRepo(); return(View(CouRepo.GetAllCourse().Find(Cou => Cou.courseId == id))); } else { return(RedirectToAction("Index", "Login")); } }
public ActionResult GetAllCourse() { if (Session["UserId"] != null && Session["Accountid"] != null) { CourseRepo Repo = new CourseRepo(); ModelState.Clear(); return(View(Repo.GetAllCourse())); } else { return(RedirectToAction("Index", "Login")); } }