I really like the lazy-loading feature of NHibernate, because it can dramatically reduced unneeded traffic to your database.
But I had a hard time figuring out, why I could not distinguish whether an object exists in the database or not. Because of the way lazy-loading works, you always get an object returned by the
load method. Usually this will be a proxy object. If you try to access a property of an non-existing entity (on the proxy), you well get an exception, but I would rather know this a time ahead.
Well, this is where the
get method comes into play. This methode retrieves the values of the properties of an entity directly, instead of lazy-loading these values by using a proxy-object like the
load method does.