O/RM code generator for CSLA.NET 4.3/4.5/4.6/4.7 generating Stored Procedures, Business Layer and Data Access Layer code for WIsej, WinForms, ASP.NET, WPF and Silverlight.
C# ASP PLpgSQL SourcePawn Visual Basic C++ Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



O/RM code generator for CSLA.NET 4.3/4.5/4.6 generating Stored Procedures, Business Layer and Data Access Layer code for Wisej, WinForms, ASP.NET, WPF and Silverlight. There is a complete set of C# templates. Currently there are VB templates, but only for non DAL architecture. You are welcome to contribute with VB templates for DAL DataReader and DAL using DTO.

2017 Mar 01 - Version 4.6.0 released

This release brings a lot of new features and some usability improvements. It's available at CslaGenFork release 4.6.0

Fixes and new features

  1. Besides SQL Server, code generation can target other database engines.

  2. Numerous fixes to VB code generation

  3. New kinds of CslaObject: abstract base classes, custom criteria classes (wip). The place holder is a nice feature that can be used to group objects (in light blue)

  1. Improved property handling with support for custom types (enums etc), database unbound properties and properties persisted to the database as null (read and WRITE)

  2. Much improved inheritance support

  3. Handle the Saved static event raised by EditableRoot with Weak Event (the generated code was causing memory leaks)

  4. Improved database type handling (doesn't crash on geography, etc)

  5. The "rules from DLL" feature supports rules with generic type parameters.

UI improvements

  • Improve Enum's display - for instance, show Editable Child Collection instead of EditableChildCollection or show C# instead of CSharp
  • Improve UI field hiding (show only UI fields that make sense)
  • Improve type filtering (show only objects/properties that make sense).
  • Introduce Don't ask again MessageBoxEx control and apply it where it fits.

Breaking changes

The incomplete feature Generate BypassPropertyChecks was dropped. Dropped legacy support: pre CSLA .NET 4.0 projects, active objects and plugin system.

Other projects

2017 Sep 04 - Rules sample moved to CslaContrib

  • The rules in CslaGenFork library were added to CslaContrib library;
  • They are available on NuGet as CslaContrib

Get started

Useful links

Browse forums, product sites, manuals and samples.

Is code generation a good idea?

If you were told generated code is bug ridden or rigid or code gen tools are just toys, then have a second opinion.

Why would I use CslaGenFork?

If you had some bad experiences with CslaGen or other code gen tools, then you don't need a feature list but an argument list.

[How do I use CslaGenFork?] (link is missing...)

No, you are not sent out to the wild on your own. We try to help all the way. Or at least, some of the way...

  • How do I start using it?
  • How do I organize myself?
  • Do I need some tools?
  • Where do I fetch the free CodeSmith engine?
  • Is there a suggested workflow for codegen?


About the license

CslaGenFork is MIT. This means you can use the generated code as you like: sell, borrow, lend or even give away.


CslaGen couldn't exist without the free CodeSmith DLL. Great care was taken in not breaching the CodeSmith license agreement neither by CslaGenFork nor by anyone using it, Thank you CodeSmith.