Developer Center

Cgen - an object-relational code generation tool

Cgen generates data access code for .NET applications. Given an XML document that represents the schema of your database, Cgen creates classes that encapsulate data access code, including select, insert/update, delete, and retrieval of lists of objects in the form of .NET 2.0 generic collections.

Code generated by Cgen includes subclasses that enable you to easily insert your own custom validation and data access code without touching the generated code.

Cgen is free (GPL) and freely redistributable. You can get the bits and the source on our download page, which also contains release notes highlighting what's new.

The objective behind this (as with all object/relational mappers) is to reduce the amount of tedious data access code you have to write by a factor of at least 80%. You can view examples of code that calls objects created by Cgen.

Currently, Cgen supports generation of .NET 2.0 code (in C#, currently) to access a MySQL database. The SQL generated by Cgen works on MySQL 4.x or later.

We invite you to contribute your own modifications to cgen. You can see a list of bugs and feature requests on Trac; you're also welcome to add your own.

We keep bugs, feature requests and a wiki in Trac, located here:

http://cvsdude.com/trac/approver/cgen

If you find a bug or have a feature request, please enter it here:

https://cvsdude.com/trac/approver/cgen/newticket