Beispiel #1
0
 public ActionResult Create(CourseCategory coursecategory)
 {
     if (ModelState.IsValid)
     {
         var  coursecategorydao = new CategoryCourseDao();
         long id = coursecategorydao.Insert(coursecategory);
         if (id > 0)
         {
             return(RedirectToAction("Index", "CategoryCourse"));
         }
         else
         {
             ModelState.AddModelError("", "Add CategoryCourse access");
         }
     }
     return(View("Index"));
 }