public ActionResult SignIn(UserModel us) { if(us != null) { var user = from u in db.users where u.email.Equals(us.email) && u.password.Equals(us.password) select u; if (user.ToArray().Length > 0) { FormsAuthentication.SetAuthCookie(us.email,false); return RedirectToAction("/"); } } return View(); }
public ActionResult SignUp(UserModel user) { db.users.Add(user); db.SaveChanges(); return RedirectToAction("/"); }