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); } }
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); } }