예제 #1
0
        /// <summary>
        /// Applies DB query selection of records for the specified map.
        /// </summary>
        private void ApplyFilterMap(IDatabaseQuery <Record> query, IPlayableMap map)
        {
            var mapHash  = map.Detail.Hash;
            var gameMode = ((int)map.PlayableMode).ToString();

            query.Where(d => d["MapHash"].ToString().Equals(mapHash, StringComparison.Ordinal))
            .Where(d => d["GameMode"].ToString().Equals(gameMode, StringComparison.Ordinal));
        }
예제 #2
0
        /// <summary>
        /// Applies DB query selection of records for the specified user.
        /// </summary>
        private void ApplyFilterUser(IDatabaseQuery <Record> query, IUser user)
        {
            var userId = user.Id.ToString();

            query.Where(d => d["UserId"].ToString().Equals(userId, StringComparison.Ordinal));
        }