public async Task <ImageVm> GetSpeakerAvatarOrDefaultAsync(string speakerId, ImageSize size) { var speaker = await _speakerProvider.GetSpeakerOrDefaultAsync(speakerId).ConfigureAwait(false); if (speaker == null) { return(null); } var imageId = size == ImageSize.Full ? speaker.AvatarId : speaker.AvatarSmallId; var image = await _imageProvider.GetImageOrDefaultAsync(imageId); return(image?.ToVm()); }
public async Task <SpeakerVm> GetSpeakerAsync(string speakerId) { var speaker = await _speakerProvider.GetSpeakerOrDefaultAsync(speakerId).ConfigureAwait(false); return(speaker.ToVm()); }