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