Esempio n. 1
0
        public ActionResult Login(string email, string password)
        {
            TasksRepository repo = new TasksRepository(Properties.Settings.Default.ConStr);
            User            user = repo.Login(email, password);

            if (user == null)
            {
                return(View("Login"));
            }
            FormsAuthentication.SetAuthCookie(email, true);
            return(Redirect("/home/index"));
        }