public ActionResult Signup(Users model) { using (var context = new RNTAEntities()) { context.Users.Add(model); context.SaveChanges(); } return(RedirectToAction("Login")); }
public ActionResult Login(Users model) { using (var context = new RNTAEntities()) { bool isValid = context.Users.Any(x => x.AppUserName == model.AppUserName && x.Password == model.Password); if (true) { FormsAuthentication.SetAuthCookie(model.AppUserName, false); return(RedirectToAction("Index", "Employees")); } } }