If I understood you correctly you would like to modify the template from your previous post and make it more flexible allowing the users to configure the database connection and Telerik Data Access
settings through New Domain Model Wizard
. Additionally, the other projects in your Visual Studio template should have similar behavior allowing custom code to be executed when they are created.
If this is indeed the case, the most straight-forward way to achieve such functionality is to create a multi-project template (similar to your implementation). Using the workflow described in this documentation article
will allow you to integrate the Telerik Data Access
project template into your own Visual Studio template taking advantage of the New Domain Model Wizard
with minimal overhead.
Each of the other project templates that need to run custom logic could take advantage of the IWizard
interface that allows you to execute code at various points while the projects are being created. This is actually very similar to the way that the New Domain Model Wizard
works - if you locate the Telerik Data Access Domain Model
project template (see my previous post), unzip it and open the .vstemplate
file you will notice the <WizardExtension>
node. This node registers the New Domain Model Wizard
Please refer to this documentation article
for more information on how to implement custom wizards.
This approach enables you to benefit from all the points of extensibility that Visual Studio provides when implementing your tool and to use project templates and wizards that are already integrated with Visual Studio.
Please note that running the New Domain Model Wizard
outside of the Visual Studio environment could prove a hard task and it would not be very beneficial because it is designed as a Visual Studio extension and it depends on the IDE.
I hope this is helpful. Please let us know if you have any more questions.
OpenAccess ORM is now Telerik Data Access
. For more information on the new names, please, check out the Telerik Product Map