public JsonResult GetByEmail(string email) { var gamer = _gamerService.GetGamerByEmail(email); var gamerViewModel = Mapper.Map <GamerViewModel>(gamer); return(Json(gamerViewModel, JsonRequestBehavior.AllowGet)); }
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()); }