HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In


You can export and import meta-models. You also can compare two meta-models, which is useful during these operations.

The following classes are available in the Mediachase.BusinessFoundation.Data.Meta.Schema namespace.

## Exporting meta-models

Export a meta-model to a file with the MetaModelGenerator class. By default, MetaModelGenerator exports all elements; use the SelectedElements property of the MetaModelGenerator class to export custom elements.

Example: Exporting a meta-model to a file





## Comparing meta-models

Before you import a meta-model, you should compare meta-models and create synchronization commands. You can export and compare an existing meta-model with the one you are about to import before importing it.

**Example:** Compare two meta-models and create synchronization script





## Importing meta-models

When importing a meta-model, follow these steps.

  1. Export the original meta-model.

  2. Compare it with the meta-model to be imported.

  3. Create synchronization commands (described in the previous section).

  4. Execute the synchronization commands.

**Example:** Loading and executing synchronization commands