Introducing WilsonORWrapper: A wrapper for Paul Wilson’s O/R Mapper

Earlier this month, I wrote about a revamp to the O/R mapper templates I’ve been working on, and included a demo project that included a working sample. Since then I’ve continued some work on these, have cleaned up the project, and added it to a public Subversion repository. Rather than write a lengthy introduction, I’ll just cut-and-paste (and reformat) the text from the readme file in the repository.

Wilson O/R Wrapper
What is it?

WilsonORWrapper is a framework that wraps around Paul Wilson’s O/R Mapper (“WORM”) that creates entity objects and a service layer for your O/R mapper objects. It is implemented as a set of assemblies that provide base functionality and a set of CodeSmith templates that can autogenerate your entity and service layers.

Who wrote it?

The author of the WilsonORWrapper project is Brian DeMarzo. However, a large part of the code contained within it is derived from CodeSmith templates by Paul Welter. Other smaller . . .

→ Read More: Introducing WilsonORWrapper: A wrapper for Paul Wilson’s O/R Mapper

Revamping the O/R Mapper CodeSmith templates

I took some time over the weekend to make big changes to my CodeSmith templates for Paul Wilson’s O/R Mapper. The changes are significant, so read on if you use them or plan on using them or are curious about them.

The biggest change is that I am removing the static service classes from the templates and distributing them as stand-alone libraries. Of course, source code will be provided along with DLLs. Considering these classes were rarely changed by users, it makes sense. It also makes the library much more accessible to folks who don’t own CodeSmith — now, CodeSmith is used to generate your project’s entity and service classes, not the framework library. This opens the door for more users of Wilson’s O/R Mapper to use this framework.

As a result, in a clean distribution, you would have the following:

ORMapper.Services.dll
ORMapper.Services.Log4NetIntegration.dll
ORMapper.Services.NLogIntegration.dll
ORMapper.Entities.dll
CodeSmith templates to generate your project’s entity classes, service classes, and unit tests

The first four are the stand-alone libraries (assemblies) . . .

→ Read More: Revamping the O/R Mapper CodeSmith templates

CodeSmith templates for WORM updated: log4net and memcached support

I’ve just posted an update to my CodeSmith templates for Wilson’s O/R Mapper. New features include:

* Added the CacheManager static class to provide a simple interface to memcached.
* Added interceptor support for log4net as an alternate to NLog.

Let me know what you think — read the (slightly) updated overview and download the templates here: CodeSmith Templates for Wilson’s O/R Mapper.

. . .

→ Read More: CodeSmith templates for WORM updated: log4net and memcached support

Update to CodeSmith templates for Wilson’s O/R Mapper

I just made a small (but important) update to the CodeSmith templates for Wilson’s O/R mapper.

12/1/06: Improved the HashCode() algorithm to avoid potential endless loop situations.

If you use these templates, be sure to download the latest release and update your partial classes.

. . .

→ Read More: Update to CodeSmith templates for Wilson’s O/R Mapper

Minor update to WORM CodeSmith templates

I just made a small update to the CodeSmith templates for Wilson’s O/R Mapper:

11/30/06: The default constructor for the EntityBase class now calls a virtual method, Initialize(). By overriding the Initialize() method in your partial class, you can ensure code will run every time your entity is instantiated. This is useful as it avoids the need to override the base constructor in the generated partial class file, which would be overwritten by the code generation process.

For more details and to download the templates, go to CodeSmith Templates for Wilson’s O/R Mapper.

. . .

→ Read More: Minor update to WORM CodeSmith templates