This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Is there a downloadable NHibernate Designer example or project that can be downloaded anywhere? I read the getting started but I'm a newbie and there are things I don't get. I have an NHibernate project I downloaded and got working. I attempted to open the same tables with NHibernate Visual Designer, create a class from that table, and just query the table. The working project had: ISession session = NHibernateModule.Session; However, when I copied that into my new Visual Designer project, it says NHibernateModule does not exist...and no amount of intellisense goodness gets anything remotely close to working. Thus the post on here. There may be 500 pages of how to do this in the getting started guide, but I honestly didn't see it. Thanks. Jay |
|
|
NHibernateModule isn't something defined by NHibernate or by the NHibernate Designer. It's something defined by the project you downloaded. To use it in your project, you'd have to copy it from the downloaded project into your project. And the chances are that the way NHibernateModule sets up NHibernate, it wouldn't pick up the designer classes. Instead, the designer generates a ConfigurationHelper class to perform all necessary configuration, and you can use the Get Started command to see how to use that to create a session. I've attached a very basic project that shows how to create a session, load data from the database and save data back using the NHibernate Designer helpers and modules. It assumes that you're using SQL Server and that your database is called StoreDemo. Run the enclosed SQL script to populate the database. Let us know if you still see problems but please be aware that we can only offer support for the visual designer -- for help with the NHibernate core we recommend the NHibernate mailing list or Stack Overflow. Hope this helps! |
|
|
First thank you for the download. I also thought ConfigurationHelper was what I wanted (I did attempt to read the documentation), but I must not understand it exactly yet. I've been doing straight ADO database work and I really want to get the hang of this. If I can get NH Visual Designer to work for me, I will register it. Thanks again. |
|
|
Just a quick note. If you're new to ORMs then it could be a good idea to try with our LightSpeed product first. It's free for small databases and a lot easier to learn than NHibernate. NHibernate is a port of a Java project and has been around for around 10 years. With that it handles a lot of strange edge cases and can be really powerful however that comes at the cost of complexity with managing mappings and understanding some of the finer details. LightSpeed can also handle a lot of edge cases but was designed from the ground up for .NET and by people already familiar with what was hard to learn about NHibernate (so we tried to make it easier). We also have videos, getting started guides - even a free 300+ page eBook which might make learning LightSpeed easier. Having said that, it's just a suggestion -- if you're super keen on NHibernate then stick with it! :-) John-Daniel |
|
|
Hi Ivan What would be super helpful for me is if you could provide me with the code block as to how you would add a new orderline to your cart. Thanks so much! |
|