コード例 #1
0
        public async Task <JsonResult> Get()
        {
            var claims = User.Claims;
            var claim  = claims.FirstOrDefault(x => x.Type == CustomClaimTypes.OwnsUserGame);

            int id = int.Parse(claim.Value);

            var userGame = await _repo.GetUserGame(id);

            return(Json(SimpleResponse.Content(userGame)));
        }
コード例 #2
0
        public async Task <JsonResult> Get(int id)
        {
            var userGame = await _repo.GetUserGame(id);

            return(Json(SimpleResponse.Content(userGame)));
        }
コード例 #3
0
 public async Task <JsonResult> Get([FromBody] int skip, [FromBody] int limit = 50)
 {
     return(Json(SimpleResponse.Content(await _repo.GetUserGames(skip, limit))));
 }