chore: using lazy loading

This commit is contained in:
Timothy Schenk 2023-11-16 14:27:17 +01:00
parent c2ba247dbe
commit 9ec8039c99

View file

@ -35,7 +35,7 @@ public class ChannelSelectionHandler : IPacketHandler<ChannelSelectionPacket>
ChannelSelectionResponsePacket responsePacket; ChannelSelectionResponsePacket responsePacket;
var guildNameResponsePacket = new CharacterSelectionSetGuildNamePacket { GuildNames = Array.Empty<string>() }; var guildNameResponsePacket = new CharacterSelectionSetGuildNamePacket { GuildNames = Array.Empty<string>() };
var account = await this._wonderkingContext.Accounts.Include(account => account.Characters) var account = await this._wonderkingContext.Accounts
.FirstOrDefaultAsync(a => a.Id == authSession.AccountId).ConfigureAwait(true); .FirstOrDefaultAsync(a => a.Id == authSession.AccountId).ConfigureAwait(true);
if (account != null && account.Characters.Count > 0) if (account != null && account.Characters.Count > 0)
{ {