Страница профиля
This commit is contained in:
@@ -22,12 +22,17 @@ public class AccountRepository : IAccountRepository
|
||||
|
||||
public async Task<Account?> GetByIdAsync(Guid id, CancellationToken cancellationToken)
|
||||
{
|
||||
return await _context.Accounts.FindAsync(new object[] { id }, cancellationToken);
|
||||
return await _context.Accounts
|
||||
.Include(a => a.Profile)
|
||||
.ThenInclude(p => p.Competencies)
|
||||
.FirstOrDefaultAsync(a => a.Id == id, cancellationToken);
|
||||
}
|
||||
|
||||
public async Task<Account?> GetByPhoneAsync(string phone, CancellationToken cancellationToken)
|
||||
{
|
||||
return await _context.Accounts.FirstOrDefaultAsync(a => a.Phone == phone, cancellationToken);
|
||||
return await _context.Accounts
|
||||
.Include(a => a.Profile)
|
||||
.FirstOrDefaultAsync(a => a.Phone == phone, cancellationToken);
|
||||
}
|
||||
|
||||
public async Task UpdateAsync(Account account, CancellationToken cancellationToken)
|
||||
|
||||
Reference in New Issue
Block a user