public AllCommentsQueryAsyncHandler(QueryDb queryDb, AllCommentsQueryAsync query)
 {
     _queryDb = queryDb;
     _query   = query;
 }
Пример #2
0
        public async Task <IActionResult> GetAll([FromServices] CommentQueryFactory commentQueryFactory, AllCommentsQueryAsync query)
        {
            var comments = await commentQueryFactory.Build(query).Get().ToList();

            return(Json(comments));
        }
Пример #3
0
 public IQueryHandler <AllCommentsQueryAsync, IAsyncEnumerable <Comment> > Build(AllCommentsQueryAsync query)
 {
     return(new AllCommentsQueryAsyncHandler(_queryDb, query));
 }