mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-30 16:58:38 +00:00
Use server-side randomness
This commit is contained in:
parent
d5ff088552
commit
543996c1a6
1 changed files with 1 additions and 2 deletions
|
@ -141,8 +141,7 @@ namespace LBPUnion.ProjectLighthouse.Controllers
|
|||
IEnumerable<Slot> slots = this.database.Slots.Where(s => s.GameVersion <= gameVersion)
|
||||
.Include(s => s.Creator)
|
||||
.Include(s => s.Location)
|
||||
.AsEnumerable() // performance?
|
||||
.OrderBy(x => new Random().Next())
|
||||
.OrderBy(_ => EF.Functions.Random())
|
||||
.Take(Math.Min(pageSize, 30));
|
||||
|
||||
string response = slots.Aggregate(string.Empty, (current, slot) => current + slot.Serialize());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue