Пример #1
0
        public async Task <ApiResource> FindApiResourceAsync(string name)
        {
            var apiResource = await _apiResourceService.GetByName(name);

            if (apiResource.IsSuccess)
            {
                return(_mapper.Map <ApiResourceDto, ApiResource>(apiResource.Data));
            }

            return(null);
        }
        public async Task <IActionResult> GetByName(string name)
        {
            ApiResourceDto item = await _apiResourceService.GetByName(name);

            return(Ok(item));
        }