public async Task <SearchResult <HumanTaskDefResult> > Handle(SearchHumanTaskDefQuery request, CancellationToken cancellationToken) { var result = await _humanTaskDefQueryRepository.Search(new SearchHumanTaskDefParameter { Count = request.Count, Order = request.Order, OrderBy = request.OrderBy, StartIndex = request.StartIndex }, cancellationToken); return(new SearchResult <HumanTaskDefResult> { Count = result.Count, StartIndex = result.StartIndex, TotalLength = result.TotalLength, Content = result.Content.Select(_ => HumanTaskDefResult.ToDto(_)) }); }
public async Task <IActionResult> Search([FromBody] SearchHumanTaskDefQuery parameter, CancellationToken token) { var result = await _mediator.Send(parameter, token); return(new OkObjectResult(result)); }