public ActionResult AddCourse() { if (Session["UserId"] != null && Session["Accountid"] != null) { CourseRepo cour = new CourseRepo(); CourseModel model = cour.dropdownrepo(); return(View(model)); } else { return(RedirectToAction("Index", "Login")); } }