From 28025ebb6069610bac9225d5b5a936d3f71ad87b Mon Sep 17 00:00:00 2001 From: hydrant Date: Mon, 22 Jul 2019 19:29:12 +0200 Subject: [PATCH] Improve SQL Query --- ReallifeGamemode.Server/Events/Key.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Events/Key.cs b/ReallifeGamemode.Server/Events/Key.cs index ffdb33ab..86d555c7 100644 --- a/ReallifeGamemode.Server/Events/Key.cs +++ b/ReallifeGamemode.Server/Events/Key.cs @@ -223,7 +223,7 @@ namespace ReallifeGamemode.Server.Events specials.Add("Keine"); using (var context = new DatabaseContext()) { - List weapons = context.FactionWeapons.ToList().FindAll(w => w.FactionId == user.FactionId); + List weapons = context.FactionWeapons.Where(w => w.FactionId == user.FactionId).ToList(); foreach (var weapon in weapons) {