This is a mirror of official site: http://jasper-net.blogspot.com/

Generate your Fluent NHibernate POCO and mapping classes automagically.

| Wednesday, March 9, 2011
At our current client, we”re refactoring some legacy data access logic to use Fluent NHibernate.  We chose NHibernate because of its large community and previous success on other projects at Clarity.  We chose the Fluent flavor primarily because of the compile-time checking of mapping files and brevity of code vs traditional hbm files.

Unless your project is very small, you”re going to want a code generation tool to create the POCO (Plain Old C# Object) and mapping files. A few previous projects at Clarity have used MyGeneration (free) to create entity objects and hbm files, and it works really well. We”re using a modified version of k-dub’s NHibernate Object Mapping template.

The struggle that we have is that MyGeneration does not generate mapping files for fluent NHibernate.  We found that LLBLGen Pro does generate both the POCO classes and mapping files. It is just about the only product that does it.  It is a bit rough around the edges, but we were able to work around it. The root problem was that Oracle”s drivers were built for x86 and we were running the x64 version of llblGen. Better exception handling would have helped us out.  It has a fully functioning 30 day trial.  Retail pricing can be found here.

Posted via email from Jasper-net

0 comments: