public static ApiResourceScope ToEntity(this ApiResourceScopeDto resourceScope)
 {
     return(resourceScope == null ? null : Mapper.Map <ApiResourceScope>(resourceScope));
 }
        private async Task <bool> CanInsertApiResourceScopeAsync(ApiResourceScopeDto apiResourceScopeDto)
        {
            var scope = apiResourceScopeDto.ToEntity();

            return(await ApiResourceRepository.CanInsertApiResourceScopeAsync(scope));
        }