public IEnumerable <string> GetClassified(TaxonomyNodeBoxMap tax) { var taxNode = _tree.FindOne(tax.Path); if (taxNode == null) { return(null); } return(_relRepo.GetAllRelationsFor(taxNode).Select(x => x.ToString())); }
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()); }
public string getClassified(string path) { var taxNode = _tree.FindOne(path); if (taxNode == null) { return(null); } relationTransformer.Entries = _relationRepo.GetAllRelationsFor(taxNode); return(JsonConvert.SerializeObject(relationTransformer.ToBox())); }