コード例 #1
0
        public JsonResult GetByEmail(string email)
        {
            var gamer          = _gamerService.GetGamerByEmail(email);
            var gamerViewModel = Mapper.Map <GamerViewModel>(gamer);

            return(Json(gamerViewModel, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        public ActionResult Index()
        {
            var loggedUser = (User)Session["user"];

            if (loggedUser != null)
            {
                var gamer = _gamerService.GetGamerByEmail(loggedUser.Email);
                if (gamer != null)
                {
                    Session["gamer"] = gamer;
                }
            }

            return(View());
        }