The reason why the result is null is that by invoking GetTaxonomies, you are actually trying to get the Taxonomy, but not the taxonomy item. By calling GetTaxonomies, you will be able to get "Tags" or "Categories" or any custom Taxonomy that you have. You may perceive this as the name of the classification, but not the classification items.
Back to the question, if you want to get the Taxa (the Taxonomy items/classification items), you should use GetTaxa method. In this case, your example would look like this:
TaxonomyManager manager = TaxonomyManager.GetManager();
var tax1 = manager.GetTaxa<
>().Where(t => t.Name == "myCategory").SingleOrDefault();
var tax2 = manager.GetTaxa<
>().Where(t => t.Name == "myTag").SingleOrDefault();
Guid id1 = tax1.Id;
Guid id2 = tax2.Id;
If you get null result, this means that the item you query for doesn't exists, or the query is incorrect (usually the filters applied to the query are wrong). More information on Taxonomies and Taxa can be found here - http://www.sitefinity.com/40/help/developers-guide/sitefinity-essentials-taxonomies.html
I hope this helps. Let us know if we can be of further help.
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward!
We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>