CodeGen.WinControls.Library

See GitHub wiki for more information: https://github.com/christoforosl/codegen-lib/wiki


Keywords
License
Apache-2.0
Install
Install-Package CodeGen.WinControls.Library -Version 3.0.2.35

Documentation

CodeGen ORM

Yes, this is yet another ORM. When to use it?
  1. 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.
  2. 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.
  3. 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.
  4. 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)

Getting the binaries into your project

Using the Nu Package Manager menu in Visual Studio, search for CodeGen.Model.Library, select it and include it in your projects.

Configure "Tools" in Visual Studio for Code Generation

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.
  1. Click Tools/External Tools..., and then click Add
  2. Specify the following:
  • Title: Generator
  • Command: [path in step 1]\CodeGenWin4.exe
  • Arguments $(ItemPath)