1

I'm creating a .ASPNET project and I would like to setup nHibernate as my ORM tool. I will be using an existing oracle database and Visual Studio 2010. ORM tools are very new to me and really could use any advice to better understand the tool and the process required to implement them.

I've been following an article at http://nhforge.org/wikis/howtonh/your-first-nhibernate-based-application.aspx to learn about it and am stuck where they say to create a local database as mine only give me the option to create a SQL server database (perhaps this a new for visual studio 2010?). Is the purpose of this database just to cache results from the live database?

Thanks for your help!

Geoff

1 Answer 1

1

have a look to SchemaExport helper class, NH can create the DataBase Schema for you ( anyway you have to create the "user" in the oracle database to connect to ). AFAIK VS2010 does not support OracleDB out of the box.

If you need to reverse engineering the DB in thehbm mapping files, you can try (my) OS tool: http://nhforge.org/wikis/howtonh/how-to-use-db2hbm.aspx, but yet again, complete Oracle is not supported, but you can do the work by configuring.

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

4 Comments

Thanks for the quick reply, could you tell me a little more about the SchemaExport helper class? For what I found online, it appears to provide the ability to export the table schema to the database. Since the database already exists wouldn't I instead need something that would important the table schema from the Oracle database. Thanks again, Geoff
Ok Geoff, I supposed you where starting from code then create the schema. in such a case you have to "reverse engineering" the database to the mapping. With NH3.0 you have a brand new option: CodeConform code.google.com/p/codeconform. Whit this library, if you can levarage some naming convention between classes and db tables/fields, you have the job done very quickly. requires some effort to learn BTW.
Is there any information available to learn about codeconform? I wasn't able to locate any documentation on their website. I still working on getting nHiberate setup in my project and the instructions state adding a dll named "castle.DynamicProxy2" but, this file is missing. Is this something they did away with in the 3.0 version? Thanks again for your help, Geoff
there is just source samples in the project that act as the current docmantation.

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.