public List <PlayerSessionRatings> GetPlayerSessionRatings(int?PlayerID) { List <PlayerSessionRatings> playerSessionRatings = null; try { GameInfoContext gameInfoContext = new GameInfoContext(); playerSessionRatings = gameInfoContext.GetPlayerSessionRatings(PlayerID); if (playerSessionRatings.Count > 0) { _logger.InfoFormat(playerSessionRatings, playerSessionRatings.Count.ToString() + " playerSessionRating has found for PlayerID : " + PlayerID.ToString(), "GetPlayerSessionRatings"); } else { _logger.InfoFormat(playerSessionRatings, "No playerSessionRating has found for PlayerID : " + PlayerID.ToString(), "GetPlayerSessionRatings"); } } catch (Exception ex) { _logger.ErrorFormat(ex.TargetSite, ex.Message, ex.Source, "GetPlayerSessionRatings"); } return(playerSessionRatings); }