Exemple #1
0
 public ActionResult Create(Contact c)
 {
     if (ModelState.IsValid)
     {
         ContactDB.AddContact(c, context);
         ViewData["Message"] = $"{c.Name} was added!";
         return(RedirectToAction("Create"));
     }
     return(View());
 }