We've been working on a lightweight code generation tool for Telerik Data Access. Here is a sneak peek at what's ahead.
We're happy to share that the tool for code generation of Data Access fluent models is already in development. As promised in our communication with you, we are working on a lightweight Fluent Model generator. It will be capable of:
You will be able to easily integrate the Fluent Model generator in your applications, as we plan to package it in a new Telerik Data Access NuGet package. Furthermore, you will be able to bend the tool any way you please, because it will be an open-source project in GitHub.
At its core, the tool is a PowerShell script capable of reading the schema of your database and generating the appropriate persistent classes, a metadatasource and a context class. Although it sounds simple, the choice of PowerShell is not an arbitrary one. This approach permanently breaks the coupling between the Data Access code generation capabilities and Visual Studio.
As a result, you have code generation with Visual Studio 2010, 2012, 2013, 2015, and whatever comes next without the complications related to the T4 templates. An additional benefit that comes with PowerShell is the ability to execute the script directly from NuGet Package Manager in Visual Studio.
To serve its purpose, the Fluent Model generator will consume a predefined set of text files that serve as code generation templates. As you will see for yourself, these files make the whole code generation process much more comprehensive and customizable.
The code output by default, however, won’t be much different from what you already recognize as a Data Access fluent model. The Fluent Model generator will produce persistent classes, a metadatasource and a context class. The noticeable change in it is that the mapping configuration is backend independent. This means that out-of-the-box, you will get a model that can be targeted at Microsoft SQL Server and Oracle without any adjustments.
Though the tool is not yet available, we are committed to releasing a Beta version in November 2015. So keep an eye out, as it's coming soon.
Please let us know how this sounds to you—we can't wait to hear your feedback.
Ivailo Ivanov is Team Lead in Telerik Data Access
Copyright © 2016, Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.