There is nothing overly complex about that diagram, so I'm going to assume that you are new to NHibernate. In that case, I recommend reading the Quick Start Guide and any of the tutorials here.
The basic process is to create .NET classes which represent your database tables and create mapping files so that NHibernate knows about them. NHibernate will take care of creating the connection between your classes and the database so that you can run HQL queries to retrieve objects. Modify/Create objects in your code and then persist the changes to the database with ISession.Save()
. The thing to remember is that (in general) you are not doing the CRUD operations, NHibernate is.
- CREATE: new MyObject(); followed by session.Save()
- UPDATE: MyObject.change(); followed by session.Save()
- DELETE: session.Delete(MyObject);
Stuart Childs
2009-04-14 14:44:44