public virtual IActionResult ApiCapabilitiesByStandardByStandardIdGet([FromRoute][Required] string standardId, [FromQuery] bool?isOptional, [FromQuery] int?pageIndex, [FromQuery] int?pageSize)
        {
            IEnumerable <Capability> capabilities;
            int totalPages;

            try
            {
                capabilities = _datastore.ByStandard(standardId, isOptional != null && isOptional.Value);
                capabilities = _datastore.GetPagingValues(pageIndex, pageSize, capabilities, out totalPages);

                if (capabilities == null)
                {
                    return(StatusCode(404));
                }
            }
            catch (Crm.CrmApiException ex)
            {
                return(StatusCode((int)ex.HttpStatus, ex.Message));
            }

            return(new ObjectResult(new PaginatedListCapabilities()
            {
                Items = capabilities.ToList(),
                PageSize = pageSize ?? Paging.DefaultPageSize,
                TotalPages = totalPages,
                PageIndex = pageIndex ?? Paging.DefaultIndex
            }));
        }
 public IQueryable <Capability> ByStandard(string standardId, bool isOptional)
 {
     return(_datastore.ByStandard(standardId, isOptional));
 }