Пример #1
0
 public ActionResult Create(Cinema cinema)
 {
     try
     {
         if (ModelState.IsValid)
         {
             cinemaService.Add(cinema);
             return(RedirectToAction("Index"));
         }
     }
     catch (DataException)
     {
         ModelState.AddModelError("", "Không thể tạo rạp chiếu!");
     }
     return(View(cinema));
 }