รูปสอบคัดเลือก

This commit is contained in:
Kittapath 2023-10-09 12:58:45 +07:00
parent 4e90ffadb2
commit b950dde304
6 changed files with 37 additions and 3 deletions

View file

@ -136,6 +136,21 @@ namespace BMA.EHR.Application.Repositories.Reports
return data;
}
public async Task<dynamic> GetExamAvatarCandidateAsync(Guid id)
{
var data = await _dbExamContext.Set<Candidate>().AsQueryable()
.Where(x => x.Id == id)
.Select(p => new
{
AvatarId = p.ProfileImg == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.ProfileImg.Id,
})
.FirstOrDefaultAsync();
if (data == null)
throw new Exception(GlobalMessages.CandidateNotFound);
return data.AvatarId;
}
#endregion
#endregion