public ActionResult Create(Course collection)
 {
     try
     {
         _Courseobj.Insert(collection);
         _Courseobj.Save();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
示例#2
0
 public ActionResult Create(Enrollment collection)
 {
     try
     {
         _Eobj.Insert(collection);
         _Eobj.Save();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }