public ActionResult CreateCanton(Cantonx cantonToCreate)
 {
     try
     {
         _entities.AddToCanton(cantonToCreate);
         _entities.SaveChanges();
         return(RedirectToAction("GetAllCantons"));
     }
     catch
     {
         return(View());
     }
 }
Esempio n. 2
0
 public ActionResult CCanton(Cantonx CantonToCreate)
 {
     try
     {
         // TODO: Add insert logic here
         _entities.AddToCanton(CantonToCreate);
         _entities.SaveChanges();
         return(RedirectToAction("DCanton"));
     }
     catch
     {
         return(View());
     }
 }