Yes, this is yet another ORM. When to use it?
- When you need COMPLETE control as to what tables and what table relationships are mapped to objects.
On other words, nothing is generated unless you want it to.
- When you need COMPLETE control on the inheritance on each mapped object. For example, CodeGen ORM allows a group of mapped objects to inherit from a base class and another group of objects from another class.
- When you need COMPLETE control on the mapped orm classes without having to worry about lost code when mapped objects are re-generated after schema change. For example, you need to add custom properties and methods to a mapped object.
- When you need Complete Code Generation from database tables. The generator detects schema changes and regenerates without loss of custom code
The project is a Visual Studio 10 solution. The solution consits of the following projects:
- org.codegen.model.lib: A class library project containing base classes and interfaces used by the generated ORM classes.
- org.codegen.lib.db: A class library project containing base classes and interfaces used for database access.
- 4 test projects:
GeneratorTests Project Units Tests ModelLibCSharpGeneratedCode Units Tests for generated C# classes (MSSQL Database) ModelLibCSharpOracleGenCode Units Tests for generated c# classes for Oracle database ModelLibTestsVisualBasicGeneratedCode Units Tests for generated Visual Basic classes (MSSQL Database)
Using the Nu Package Manager menu in Visual Studio, search for CodeGen.Model.Library, select it and include it in your projects.
After get the binaries with Nu Package Manager, folder packages\CodeGen.Model.Library.4.x.x.x\tools is created with the orm's Code Generator executable CodeGenWin4.exe. To run this code generator when you click on an xml generator control file, you can configure the Tools option in Visual Studio.
- Click Tools/External Tools..., and then click Add
- Specify the following:
- Title: Generator
- Command: [path in step 1]\CodeGenWin4.exe
- Arguments $(ItemPath)