示例#1
0
        public IHttpActionResult Get(string id)
        {
            var user = userModels.GetUser(id);

            if (user == null)
            {
                return(NotFound());
            }
            return(Ok(user.name));
        }
        public ActionResult UserProfile()
        {
            if (Session["UserTicket"] != null)
            {
                UserModels model = new UserModels();

                model = model.GetUser(new Guid(Session["UserTicket"].ToString()));

                return(View(model));
            }
            return(Redirect("~/Login/Login"));
        }