public async Task <IActionResult> Get() { _logger.LogInformation(Global.StartGetResourceTypes); var result = await _scimSchemaQueryRepository.GetAllRoot(); return(new OkObjectResult(new JArray(result.Select(s => ToDto(s))))); }
public async virtual Task <IActionResult> Get() { _logger.LogInformation(Global.StartGetResourceTypes); var result = await _scimSchemaQueryRepository.GetAllRoot(); var resolutionResults = _resourceTypeResolver.ResolveAll(); var getResult = new JObject { { StandardSCIMRepresentationAttributes.Schemas, new JArray(new [] { StandardSchemas.ListResponseSchemas.Id }) }, { StandardSCIMRepresentationAttributes.TotalResults, resolutionResults.Count() }, { StandardSCIMRepresentationAttributes.ItemsPerPage, resolutionResults.Count() }, { StandardSCIMRepresentationAttributes.StartIndex, 1 }, { StandardSCIMRepresentationAttributes.Resources, new JArray(result.Select(s => ToDto(s, resolutionResults))) } }; return(new OkObjectResult(getResult)); }