Ejemplo n.º 1
0
 public ActionResult Create(SiteModel site)
 {
     if (ModelState.IsValid)
     {
         using (SiteContext context = new SiteContext())
         {
             context.AddSite(site);
         }
         return(RedirectToAction("Index"));
     }
     return(View(site));
 }