Beispiel #1
0
        public ActionResult Login(LoginModel model)
        {
            UsersManager manager = new UsersManager();
            UserDto      UserDto = manager.Denetle(model.user.UserID, model.user.Password);

            Session["User"] = UserDto.UserId;
            Session["Role"] = UserDto.Role;
            if (Session["Role"].ToString() == "ADMIN")
            {
                return(RedirectToAction("Admin", "Admin"));
            }
            else
            {
                return(RedirectToAction("Index", "Home"));//önce view sonra controller
            }
        }