Example #1
0
        public int RemoveRelations(IClassifiable relatable, TaxonomyNode type = null)
        {
            var rels = relationRepo.GetAllRelationsFor(relatable).AsEnumerable();

            if (type != null)
            {
                rels = rels.Where(r => r.Type != null && r.Type.Id == type.entity.Id);
            }
            relationRepo.DeleteAll(rels);
            return(rels.Count());
        }