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)); }
public ActionResult Signup(Admin model) { using (var context = new World2MationEntities()) { context.Admin.Add(model); context.SaveChanges(); } return(RedirectToAction("Login")); }