public async Task <IActionResult> GetResourcesByRule([FromRoute] int id, [FromServices] IResourcesService _resourcesService) { var res = await _resourcesService.ListByRuleKey(id); var resD = _mapper.Map <IEnumerable <Resource>, IEnumerable <ResourceMaxDto> >(res); return(Ok(resD)); }