views:

654

answers:

2

Does anyone know of a good tool to reverse engineer mappings and business classes for NHibernate? NHibernate is best for greenfield development, but we also need to work with large legacy databases. I've tried NGen, which does ok, but it does the entire DB and you cannot select individual tables or map to sprocs and it maps a UNIQUEIDENTIFIER to a UNIQUEIDENTIFIER(should have been to a GUID).

We do have a corporate budget, so the tool doesn't have to be free. I understand that Frans has said the next version of LLBLGen will provide support for NHibernate and other 3rd parties (Is LL to be the one generator to rule them all?), but that's 4th quarter or later.

A: 

We use LLBLGen exclusively and LOVE it. Since we utilize legacy databases as well it was a perfect fit. Maybe an alpha or beta will be available earlier?

Jess
We looked extensively at both NHibernate and LLBLGen before going with NHibernate. NHibernate won, but only barely. They definitely have put together an excellent product, but ultimately we decided that we liked having xml mapping files over compiled projects.
John
A: 

I've used MyGeneration with NHibernate before. Unfortunately, I can't say much about the setup/configuration process because I inherited the files from another developer. I do know that you tell it which database to run against and then it comes back with a list of database objects (for sure tables and views, not sure about stored procedures). Then you select which objects you want to generate mappings for and click a button which generates mappings and/or classes with a template engine.

Stuart Childs