I think you're wrong about what Load does. This creates an NHibernate proxy object for you by ID without actually querying the database.
When you call a property, it will query the database, if you provided an invalid identifier, there is no underlying object, so an exception.
The usual situtations for which you will use this, for example, is that you have a State object, and the user selects PA from the drop-down list. Instead of querying the database for the State object, since you already have the PA key, you can call Load , and then pass that state object to another object to have the correct relationship between the X object and State PA.
The method you want to use for a common get object or get null if the key does not exist is just Session.Get<T>(object ID)
Chris marisic
source share