public ActionResult Create([Bind(Include = "Id,Name,City")] Employee employee) { if (ModelState.IsValid) { db.Employee.Add(employee); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(employee)); }
public ActionResult SignUp(User model) { using (var context = new officeEntities()) { context.User.Add(model); context.SaveChanges(); } return(RedirectToAction("Login")); }