Страница профиля

This commit is contained in:
Халимов Рустам
2026-02-13 14:24:01 +03:00
parent b24b9d697f
commit 1e72d006c4
34 changed files with 1169 additions and 27 deletions

View File

@@ -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)