예제 #1
0
        public ActionResult CreateUser(Authentication authentication)
        {
            if (ModelState.IsValid)
            {
                db.Authentications.Add(authentication);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(authentication));
        }
예제 #2
0
        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 }));
        }