private void DeleteAttributeFromChildrenOfCategory(Category category, string attributeName) { if (category == null) { return; } if (!category.Children.Any()) { return; } var children = _categoryService.GetByParenId(category.Id); foreach (var child in children) { _attributeService.DeleteByCategoryIdAndAttribueName(child.Id, attributeName); } }