This section provides an overview of what nhibernate is, and why a developer might want to use it.
It should also mention any large subjects within nhibernate, and link out to the related topics. Since the Documentation for nhibernate is new, you may need to create initial versions of those related topics.
Entities has associations to other objects, this may be an association to a single item (many-to-one) or an association to a collection (one-to-many, many-to-any).
At any rate, you are able to tell NHibernate to automatically traverse an entity's associations, and act according to the cascade option. For instance, adding an unsaved entity to a collection with save-update cascade will cause it to be saved along with its parent object, without any need for explicit instructions on our side.
The LINQ to NHibernate driver is centered on the IQueryable<T>
interface.
Be sure to add using NHibernate.Linq;
in order to use the NHibernate LINQ provider.
NHibernate 3.0 introduced the QueryOver API, which combines the use of extension methods and lambda expressions to provide a statically typesafe wrapper around the ICriteria API. The ICriteria API is NHibernate's implementation of the Query Object pattern.