Reputation: 385
I'm quite new with NHibernate and it's the first ORM that I use. The question is if there is possible to generate automatically all the mapping files from a database (MySQL) that I already have created
Thanks in advance!
Upvotes: 0
Views: 647
Reputation: 16389
No, NHibernate does not provide this feature out of the box. But there are tools developed by others; you will find many if you search Google.
I use NHibernateMappingGenerator. https://github.com/rvrn22/nmg.
Tool is very flexible and allow you configuring how the mappings and entities should be generated. Multiple settings help you tune the output with your expectations.
In some cases you may still need to modify the entities and mapping files to fit your requirements. But still, this automates much work and lay down skeleton for further fine-tuning.
Upvotes: 1