Worm has three ways to create object model
-
Use code generator
-
Write mapping schema for object manually
-
Use attribute-based mapping
If you already have object model you can use POCO functionality to map the classes.
By this time Worm has no full-functional VS designer and the only way to automatically generate model is to use codegen utilitis. There is two
To generate xml from AdventureWorks run the following
Worm.CodeGen.XmlGenerator.exe -S=(local)\sqlexpress -E -D=AdventureWorks
The program produce AdventureWorks.xml (143.19 kb).
Now, you can generate code from the xml via code generator or custom tool. VS custom tool is code generator that can be used with Visual Studio. To use it you should
- register custom tool in VS
- add xml to solution
- assign custom tool to xml file
Here is how to register custom tool in Visual Studio
regasm /codebase <path to custom tool>\Worm.CodeGen.VSTool.dll
Now you can add xml file to solution and set Custom tool property of the AdventureWorks.xml file to WormEntityClassGenerator.