public ActionResult CreateUser(Authentication authentication) { if (ModelState.IsValid) { db.Authentications.Add(authentication); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(authentication)); }
public ActionResult AddToEmailCart(string photoShootName, string link, string searchTerm, string searchField, string type) { EmailCart emailcart = new EmailCart(); emailcart.photoShootName = photoShootName; emailcart.link = link; emailcart.netId = User.Identity.Name; if (ModelState.IsValid) { db.EmailCarts.Add(emailcart); db.SaveChanges(); } return(RedirectToAction("Index", new { searchTerm = searchTerm, searchField = searchField, type = type })); }