Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class Map Generator for Fluent NHibernate

Is there a Class Map generator for Fluent NHibernate? I need something like db2hbm but I want it to generate Fluent Class Maps instead of xml mappings.

I am aware of AutoMapping for Fluent but that is not what I want. I want to be able to generate Class Map files from tables in database and push them to my src repository.

like image 680
kaptan Avatar asked Apr 09 '10 00:04

kaptan


People also ask

What is the difference between NHibernate and fluent NHibernate?

Fluent NHibernate offers an alternative to NHibernate's standard XML mapping files. Rather than writing XML documents, you write mappings in strongly typed C# code. This allows for easy refactoring, improved readability and more concise code.


2 Answers

You can do this with NHibernate Mapping Generator.

like image 68
RaRa Avatar answered Oct 20 '22 11:10

RaRa


You can do this with Visual NHibernate. Check the Fluent Nhibernate option on the Options screen to create FNH mapping code.

like image 31
Gareth Hayter Avatar answered Oct 20 '22 12:10

Gareth Hayter