public async Task <StaffDto> Handle(GetStaffMemberProfileQuery request, CancellationToken cancellationToken) { var staffMember = await _dbContext .StaffMembers .Include(s => s.StaffMemberSkills) .ThenInclude(sms => sms.Skill) .ProjectTo <StaffDto>(_mapper.ConfigurationProvider) .Where(member => member.Name == request.Name) .FirstOrDefaultAsync(); staffMember.ProfilePhoto = await _storage.GetProfileUri(staffMember.Name); return(staffMember); }
private async Task <StaffDto> GetProfilePhoto(StaffDto staffMember) { staffMember.ProfilePhoto = await _storage.GetProfileUri(staffMember.Name); return(staffMember); }