Ejemplo n.º 1
0
        public ActionResult Create([Bind(Include = "Id,Name,Address")] User user)
        {
            if (ModelState.IsValid)
            {
                db.User.Add(user);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(user));
        }
Ejemplo n.º 2
0
 public ActionResult Signup(Admin model)
 {
     using (var context = new World2MationEntities())
     {
         context.Admin.Add(model);
         context.SaveChanges();
     }
     return(RedirectToAction("Login"));
 }