A library aimed at generating C# class files from code or other data sources. Also contains a content model generator aimed at exporting EPiServer Commerce content types generated by inRiver iPMC imports.
- Fork this repository and build the solution in Visual Studio.
- There should now be a cmg.exe in your output folder.
- This file can be added to path.
Short | Long | Required | Description |
---|---|---|---|
-o | -output | yes | Output path |
-n | -namespace | yes | The namespace for the generated classes |
-p | -project | no | Path to the EPiServer web project |
-c | -connectionString | no | Override connection string (if not same as project web.config) |
-v | -connectionProvider | no | Override connection provider name (if other than SQL) |
-b | -generateBaseClasses | no | Aggregates common properties into base classes |
-r | -reflectExistingClasses | no | Merges reflected properties (from project) with database content types |
In this case we want to just generate classes from Commerce
cmg -c {connectionString} -n Project.Web.Features.Models -o c:\temp\projectclasses
In this case we want to read back existing project classes, merge them into base classes and merge it with newly added commerce data.
cmg -p c:\projects\project\src\project.web -n Project.Web.Features.Models -o c:\temp\projectclasses -b -r