public async Task <IHttpActionResult> GetAllAsync([FromUri] ProjectQueryDto model, CancellationToken cancellationToken) { if (!ModelState.IsValid) { return(BadRequest()); } if (model == null) { model = new ProjectQueryDto(); } return(Ok(await _projectManager.FindAllAsync( ApiSecurity.CurrentUserId, model.Name, model.OrderBy, model.Page, model.Limit, model.Fields, cancellationToken))); }
/// <inheritdoc/> public IList <Project> QueryProject(ProjectQueryDto dto) { return(_projectQueryService.Query(dto.Query, dto.Sort, dto)); }