Add avatar support

This commit is contained in:
Holden
2026-06-20 15:33:46 -05:00
parent 942bb4c80b
commit e24a4c6872
15 changed files with 365 additions and 9 deletions
@@ -12,6 +12,15 @@ public class ProfileRepository(DatabaseContext dbContext) : IProfileRepository
=> dbContext.Profiles
.FirstOrDefaultAsync(x => x.ProfileId == profileId, ct);
public Task<Avatar?> GetAvatarByProfileIdAsync(
Guid profileId,
CancellationToken ct = default)
=> dbContext.Profiles
.AsNoTracking()
.Where(x => x.ProfileId == profileId)
.Select(x => x.Avatar)
.FirstOrDefaultAsync(ct);
public async Task<IReadOnlyList<Profile>> GetByIdsAsync(
List<Guid> profileIds,
CancellationToken ct = default)
@@ -36,4 +45,4 @@ public class ProfileRepository(DatabaseContext dbContext) : IProfileRepository
public Task SaveChangesAsync(CancellationToken ct = default)
=> dbContext.SaveChangesAsync(ct);
}
}