Building a Custom Schema Provider for SchemaExplorer
If you have a data source that looks like a database (it exposes data as tables and columns, perhaps with indexes, views and commands), you can plug it into SchemaExplorer with a custom schema provider. Users can then pick objects from your data source with the standard SchemaExplorer property editors, and your templates can work with it through the SchemaExplorer object model, just like with a database.
A schema provider is a .NET Framework class library with a public class that implements the SchemaExplorer.IDbSchemaProvider interface. CodeSmith Generator finds it by its file name, which must end with SchemaProvider.dll.
Steps
- Create the schema provider: set up the project, add references to Generator's assemblies, and implement the interfaces.
- Build it into Generator's
SchemaProvidersfolder. - Debug it by running Generator from Visual Studio.
- Deploy it to other computers, and update it for new versions of Generator.
Tip
Before you write your own, check the schema providers that ship with Generator. Your data source may already be supported.