0

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!

2

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.