public Task <SearchResourceOwnerResult> Execute(SearchResourceOwnerParameter parameter) { if (parameter == null) { throw new ArgumentNullException(nameof(parameter)); } return(_resourceOwnerRepository.Search(parameter)); }
public async Task <IActionResult> GetBulkPublicClaims([FromBody] JObject jObj) { if (jObj == null) { throw new ArgumentNullException(nameof(jObj)); } var parameter = _requestBuilder.GetSearchResourceOwner(jObj); var result = await _resourceOwnerRepository.Search(parameter); if (result == null) { return(this.BuildError(ErrorCodes.InternalError, ErrorDescriptions.TheBulkPublicClaimsIsNotWorking, HttpStatusCode.InternalServerError)); } var arr = new JArray(); foreach (var resourceOwner in result.Content) { arr.Add(ToDto(resourceOwner)); } return(new OkObjectResult(arr)); }