示例#1
0
 public Task <List <ArticleTag> > Handle(GetCurrentArticleTagsQuery message, CancellationToken cancellationToken)
 {
     return(_context.ArticleArticleTags
            .Where(a => a.ArticleId == message.ArticleId)
            .Join(_context.ArticleTags.ToList(), aat => aat.ArticleTagId, at => at.ArticleTagId, (aat, at) => at)
            .ToListAsync(cancellationToken: cancellationToken));
 }
示例#2
0
 public GetCurrentArticleTagsQueryHandlerShould()
 {
     this._getCurrentArticleTagsQuery = new GetCurrentArticleTagsQuery {
         ArticleId = 1
     };
 }