0

I have searched for automatic mapping generator for nhibernate. So far I have tried following

  • NHibernate Mapping Generator
  • Devart Entity Developer
  • Codesmith generator

From those Nhibernate Mapping Generator is the only one that supports NH style fluent mapping by default. Devart and codesmith provides possibility to write own templates that would do the job. Devart and Codesmith also has "challenges", when you want mappings and entities be located in different assemblies.

I would like to ask, if you guys have any experience from the tools above? Also if you have any other tools you could suggest to me.

I am also interested in integrating those tools into CI environment. Whenever DB changes, I want entities and mapping be generated automatically.

1 Answers1

1

I use Devart Entity Developer and it does support fluent nHibernate mapping. In-fact I use this on all of my projects. You simply add the fluent template from those provided and configure the output location. It generates the mapping code files automatically based of the model you load in from your database every time you build the project. It integrates well into Visual Studio if required. I would thoroughly recommend you give the 30 day trial ago.

Devart Entity Developer

In particular I draw your attention to this paragraph:

Entity Developer NHibernate mapping generator can generate both XML and fluent mapping. For XML mapping you may customize output settings, use the File per class option. XML mapping is generated as an embedded resource by default. Our NHibernate designer provides full support for Fluent NHibernate mapping - it supports all kinds of inheritances, components, composite IDs, etc.

connectedsoftware
  • 6,987
  • 3
  • 28
  • 43