public void SetRelation(IClassifiable relatable, IClassifiable related, RelationDirection direction = RelationDirection.Undefined, TaxonomyNode type = null) { foreach (var relEntity in relationRepo.GetRelated(relatable, direction, type == null ? null : type.entity)) { relationRepo.Delete(relEntity); } RelateInternal(relatable, related, direction, type); }