public AllCommentsQueryAsyncHandler(QueryDb queryDb, AllCommentsQueryAsync query) { _queryDb = queryDb; _query = query; }
public async Task <IActionResult> GetAll([FromServices] CommentQueryFactory commentQueryFactory, AllCommentsQueryAsync query) { var comments = await commentQueryFactory.Build(query).Get().ToList(); return(Json(comments)); }
public IQueryHandler <AllCommentsQueryAsync, IAsyncEnumerable <Comment> > Build(AllCommentsQueryAsync query) { return(new AllCommentsQueryAsyncHandler(_queryDb, query)); }