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 code blocks are derived from general tips pulled from various web sources; credits to the authors where relevant are given within the source code.
How to use it
To use the wrapper, you first need to do three things: create your database, create your mappings file, and create your projects.
CodeSmith templates are provided to build your mappings file, which you should always review and edit manually after creation.
CodeSmith templates are provided to build your entity and service classes. These templates will also create or update a Visual Studio project for both your entity and service layers, and will optionally create a test project (NUnit required).