예제 #1
0
        GetOrderedGuildExperienceLeaderboard(ulong guildId)
        {
            if (UserXp.AsNoTracking().Any())
            {
                List <UserExperience> experiences = UserXp.AsNoTracking().Where(entry => entry.GuildId == guildId).ToList();

                return(experiences.OrderByDescending(x => x.TotalXP)
                       .ToList().AsReadOnly());
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        GetOrderedGlobalExperienceLeaderboard()
        {
            if (UserXp.AsNoTracking().Any())
            {
                var experiences = UserXp.AsNoTracking().Where(x => x.GuildId == 0);

                return(experiences.OrderByDescending(x => x.TotalXP)
                       .ToList().AsReadOnly());
            }
            else
            {
                return(null);
            }
        }