public async Task <StoryPostDto> Handle(StoryPostQuery request, CancellationToken cancellationToken) { var unmaskedId = _mask.RevealId(request.Id); var publishedId = _db.EpisodeEntryStatus.First(x => x.Name == StaticValues.Published).Id; var entity = await _db.EpisodeEntry.Where(x => x.Id == unmaskedId && x.EpisodeEntryStatusId == publishedId) .FirstOrDefaultAsync(cancellationToken: cancellationToken); var dto = _mapper.Map <StoryPostDto>(entity); return(dto); }
public int Resolve(ViewModelWithId source, QueryWithId destination, int destMember, ResolutionContext context) { return(_masker.RevealId(source.Id)); }
public int Resolve(StoryPostViewModel source, StoryPostDto destination, int destMember, ResolutionContext context) { return(_masker.RevealId(source.Id)); }