Esempio n. 1
0
 public ActionResult Create(Nse nse)
 {
     if (ModelState.IsValid)
     {
         _nseService.Create(nse);
         return(RedirectToAction(nameof(Index)));
     }
     return(View(nse));
 }
Esempio n. 2
0
        public ActionResult Create(Nse nse)
        {
            if (ModelState.IsValid)
            {
                nseService.Create(nse);
                return(RedirectToAction(nameof(Index)));
            }
            return(View(nse));

            /*try
             * {
             *  // TODO: Add insert logic here
             *
             *  return RedirectToAction(nameof(Index));
             * }
             * catch
             * {
             *  return View(nse);
             * }*/
        }