This is the API that will craete new taxa in categories taxonomy, the approach is relevant for Tags.
var manager = TaxonomyManager.GetManager();
//here take the CategoriesTaxonomyId, also you may take TagsTaxonomyId
var CategoriesTaxonomy = manager.GetTaxonomy<HierarchicalTaxonomy>(TaxonomyManager.CategoriesTaxonomyId);
var newDepartment = manager.CreateTaxon<HierarchicalTaxon>();
"This is Europe"
The query is not construced to suit the purpose for Adding taxons to existing taxonomy and I suppose this is causing the exception.
To Query the taxons use this API:
TaxonomyManager manager = TaxonomyManager.GetManager();
// p.Title gets the name of one new taxonomy
var taxonomy = manager.GetTaxonomies<HierarchicalTaxonomy>().Where(p => p.Title ==
this will return a list of all taxonomies ordered as they are ordered in the backend of Sitefinity (Ordinal is the property).
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>