Early-bound Template-based Code Generator
This XrmToolBox tool allows you to generate early-bound entity classes
only for the selected columns or relationships of the selected tables
using a customisable T4 Template (developed by
Ahmed Elsawalhy).
The "CrmSvcUtil" tool from Microsoft generates early-bound .NET
Framework classes that represent the entity data model. But without
creating an extension, this tool generates the classes for all tables in
the environment even if only a few of them are required. It also produces
SDK-specific properties, like EntityReference and OptionSetValue, which
requires a tiny bit of extra work to map to a .NET value-type and
primitive types.
To generate only what’s needed and replace the SDK types with .NET types,
you can use this tool to customise the way the code is generated using the T4
template.
- Tool Information
- Documentation
- Quick Guide
- Functionalities
- Generate early-bound classes code file (Fig. 4)
- Generate only what's needed
- Select the required tables (Fig. 1)
- Open Select Entities page (Fig. 1, Pt. 1)
- Load the list of tables (Fig. 1, Pt. 2)
- Filter the tables by logical name (Fig. 1, Pt. 4)
- Filter the tables by display name (Fig. 1, Pt. 3)
- Select the tables (Fig. 1, Pt. 5)
- Override table name (Fig. 1, Pt. 1, 7)
- Select items to be generated (Fig. 1, Pt. 8)
- Select bound actions to be generated (Fig. 1, Pt. 9)
- Select unbound actions to be generated (Fig. 3, Pt. 2)
- Select the required table components (columns, relationships) (Fig. 2)
- Open table details page by double-clicking on the table (Fig. 1, Pt. 6)
- Select the columns (Fig. 2, Pt. 2)
- Filter the columns by logical name (Fig. 2, Pt. 1)
- Override column name (Fig. 2, Pt. 3)
- Select the relationships (Fig. 2, Pt. 5, 6, 7)
- Filter the relationships by schema name (Fig. 2, Pt. 4)
- Generate code using the T4 template (Fig. 4)
- Open Template page (Fig. 4, Pt. 1)
- Reset the Template to the default template (Fig. 4, Pt. 2)
- Specify the namespace for the code file (Fig. 4, Pt. 4)
- Edit the template (Fig. 4, Pt. 6)
- Save the T4 template as .tt file (Fig. 4, Pt. 5)
- Generate code file (Fig. 4, Pt. 3)
- Save the generated .cs code file (Fig. 4, Pt. 7)
- Complete list of features in the documentation
- Additionally, the tool can
- Similar Tools
- Code Generation Tool (CrmSvcUtil.exe)
- Early Bound Generator
- Early Bound Generator for Crm Web Api
- Early-bound Template-based Code Generator
- Latebound Constants Generator
Fig. 1 - Select Tables to be Generated
Fig. 2 - Select Columns and Relationships to be Generated
Fig. 3 - Global Options
Fig. 4 - T4 Template and Generated Code
Comments
Post a Comment