Find the client
This commit is contained in:
parent
5c046dfa88
commit
5ff52614df
1 changed files with 2 additions and 2 deletions
|
|
@ -16,8 +16,8 @@ public class ClientStore : IClientStore
|
||||||
|
|
||||||
public async Task<Client> FindClientByIdAsync(string clientId)
|
public async Task<Client> FindClientByIdAsync(string clientId)
|
||||||
{
|
{
|
||||||
var clientFromDb = await ApplicationDbContext.Client.FirstAsync(c => c.Id == clientId);
|
var clientFromDb = await ApplicationDbContext.Client.FirstOrDefaultAsync(c => c.Id == clientId);
|
||||||
|
if (clientFromDb == null) return null;
|
||||||
return new Client
|
return new Client
|
||||||
{
|
{
|
||||||
ClientId = clientFromDb.Id,
|
ClientId = clientFromDb.Id,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue