From 4e58b03c0fae78834ae5078b07b469e6372cc691 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Wed, 15 Jun 2022 20:19:22 -0500 Subject: [PATCH] fix up query/check --- SharedLibraryCore/Services/ClientService.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/SharedLibraryCore/Services/ClientService.cs b/SharedLibraryCore/Services/ClientService.cs index 3fd8ce1e..4e1c21c3 100644 --- a/SharedLibraryCore/Services/ClientService.cs +++ b/SharedLibraryCore/Services/ClientService.cs @@ -39,7 +39,8 @@ namespace SharedLibraryCore.Services TotalConnectionTime = client.TotalConnectionTime, AliasLink = client.AliasLink, Password = client.Password, - PasswordSalt = client.PasswordSalt + PasswordSalt = client.PasswordSalt, + GameName = client.GameName }) .FirstOrDefault(client => client.NetworkId == networkId && client.GameName == game) ); @@ -237,12 +238,8 @@ namespace SharedLibraryCore.Services public virtual async Task GetUnique(long entityAttribute, object altKey = null) { - if (altKey is not Reference.Game game) - { - throw new ArgumentException($"Alternate key must be of type {nameof(Reference.Game)}"); - } await using var context = _contextFactory.CreateContext(false); - return await GetUniqueQuery(context, entityAttribute, game); + return await GetUniqueQuery(context, entityAttribute, (Reference.Game)altKey); } public async Task Update(EFClient temporalClient)