public async Task <IHttpActionResult> GetAllAsync([FromUri] PortalQueryDto model, CancellationToken cancellationToken) { if (!ModelState.IsValid) { return(BadRequest()); } if (model == null) { model = new PortalQueryDto(); } return(Ok(ModelMapper.ToPortalListDto( await _portalManager.FindAllAsync( ApiSecurity.CurrentUserId, model.Name, model.OrderBy, model.Page, model.Limit, model.Fields, cancellationToken)))); }