API support

CSOM SSOM

Can be deployed under

Site

Notes

Term store lookup is enabled via TaxonomyTermStoreDefinition object.

Both CSOM/SSOM object models are supported.

Provision used Name, Id or UseDefaultSiteCollectionTermStore properties to lookup existing termstore.

Examples

Add taxonomy term store by Name

var mmsTermStore = new TaxonomyTermStoreDefinition
{
    Name = "Managed Metadata Service"
};

var model = SPMeta2Model.NewSiteModel(site =>
{
    site.AddTaxonomyTermStore(mmsTermStore, termStore =>
    {
        // do stuff, add groups, term sets
    });
});

DeployModel(model);


                            
Add default taxonomy term store

var defaultSiteTermStore = new TaxonomyTermStoreDefinition
{
    UseDefaultSiteCollectionTermStore = true
};

var model = SPMeta2Model.NewSiteModel(site =>
{
    site.AddTaxonomyTermStore(defaultSiteTermStore, termStore =>
    {
        // do stuff, add groups, term sets
    });
});

DeployModel(model);