Пример #1
0
            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);
            }
Пример #2
0
 public int Resolve(ViewModelWithId source, QueryWithId destination, int destMember, ResolutionContext context)
 {
     return(_masker.RevealId(source.Id));
 }
Пример #3
0
 public int Resolve(StoryPostViewModel source, StoryPostDto destination, int destMember, ResolutionContext context)
 {
     return(_masker.RevealId(source.Id));
 }