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

            return(Ok(result));
        }