public Task <PaginatedResult <ProjectViewModel> > Handle(FindProjectsQuery request, CancellationToken cancellationToken) { return(_context.Projects .AsNoTracking() .Select(c => new ProjectViewModel(c)) .AsPaginated(request.Page, request.PageSize)); }
public async Task <IActionResult> FindAll([FromQuery] FindProjectsQuery query) { var result = await _mediator.Send(query); return(Ok(result)); }