public virtual IActionResult ApiStandardsByCapabilityByCapabilityIdGet([FromRoute][Required] string capabilityId, [FromQuery] bool?isOptional, [FromQuery] int?pageIndex, [FromQuery] int?pageSize) { IEnumerable <Standard> standards; int totalPages; try { standards = _datastore.ByCapability(capabilityId, isOptional); standards = _datastore.GetPagingValues(pageIndex, pageSize, standards, out totalPages); } catch (Crm.CrmApiException ex) { return(StatusCode((int)ex.HttpStatus, ex.Message)); } return(new ObjectResult(new PaginatedListStandards() { Items = standards.ToList(), PageIndex = pageIndex ?? Paging.DefaultIndex, TotalPages = totalPages, PageSize = pageSize ?? Paging.DefaultPageSize, })); }
public IEnumerable <Standards> ByCapability(string capabilityId, bool isOptional) { return(_datastore.ByCapability(capabilityId, isOptional)); }