Exemplo n.º 1
0
 public ActionResult Create(Content content)
 {
     if (ModelState.IsValid)
     {
         var addContent = _contentServices.AddContent(content);
         var idContent  = addContent;
         if (idContent == 0)
         {
             ModelState.AddModelError("", "Cannot Add Content!");
         }
         return(RedirectToAction("Index"));
     }
     ViewBag.ContentCategory = _contentServices.GetContentCategory();
     return(View(content));
 }