refactor: async query
This commit is contained in:
parent
55e7e8fc4c
commit
157dbbc2f5
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using Konscious.Security.Cryptography;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NetCoreServer;
|
||||
|
@ -30,7 +31,7 @@ public class LoginHandler : IPacketHandler<LoginInfoPacket>
|
|||
{
|
||||
LoginResponseReason loginResponseReason;
|
||||
_logger.LoginData(packet.Username, packet.Password);
|
||||
var account = _wonderkingContext.Accounts.FirstOrDefault(a => a.Username == packet.Username);
|
||||
var account = await _wonderkingContext.Accounts.FirstOrDefaultAsync(a => a.Username == packet.Username).ConfigureAwait(false);
|
||||
|
||||
if (account == null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue