removed defaults from FirstOrDefault to avoid reading everything with ToList

This commit is contained in:
Sarah Faey 2022-12-05 11:55:21 +01:00
parent 24ad2b11e5
commit a4c29d8891
6 changed files with 50 additions and 36 deletions

View file

@ -74,8 +74,9 @@ namespace Lieb.Data
.Include(r => r.SignUps)
.ThenInclude(s => s.RaidRole)
.Include(r => r.DiscordRaidMessages)
.ToList()
.FirstOrDefault(r => r.RaidId == raidId, new Raid());
.FirstOrDefault(r => r.RaidId == raidId);
if(raid == null) return;
var httpClient = _httpClientFactory.CreateClient(Constants.HttpClientName);