public override async Task <PlayerCurrentGamesResponse> GetPlayerCurrentGames(PlayerCurrentGamesRequest request, ServerCallContext context)
        {
            DbUserModel dbUserModel = context.UserState["user"] as DbUserModel;

            if (dbUserModel == null)
            {
                return new PlayerCurrentGamesResponse()
                       {
                           Status = ResponseFactory.createResponse(ResponseType.UNAUTHORIZED)
                       }
            }
            ;

            PlayerCurrentGamesResponse currentGameResponse = new PlayerCurrentGamesResponse();
            List <GameConfiguration>   rooms = (await dbUserModel.GetActiveRooms()).Select(it => it.GameConfiguration).ToList();

            currentGameResponse.Games.AddRange(rooms);
            currentGameResponse.Status = ResponseFactory.createResponse(ResponseType.SUCCESS);
            return(currentGameResponse);
        }
        public override async Task <PlayerCurrentGamesResponse> GetPlayerCurrentGames(PlayerCurrentGamesRequest request, ServerCallContext context)
        {
            RedisUserModel user = context.UserState["user"] as RedisUserModel;

            if (user == null)
            {
                return new PlayerCurrentGamesResponse()
                       {
                           Status = ResponseFactory.createResponse(ResponseType.UNAUTHORIZED)
                       }
            }
            ;

            PlayerCurrentGamesResponse currentGameResponse = new PlayerCurrentGamesResponse();
            List <Room> rooms = (await user.GetActiveRooms()).ConvertAll(it => it.asRoom().Result);

            currentGameResponse.Games.AddRange(rooms);
            currentGameResponse.Status = ResponseFactory.createResponse(ResponseType.SUCCESS);
            return(currentGameResponse);
        }