I'm trying to learn some NHibernate after diving into EF4. Is the equivalent of the EF4 ObjectContext (or DbContext) the NHibernate Session?
Specifically, in EF4, you derive from ObjectContext (or DbContext) and your class contains explicit ObjectSet's of each entity, for example:
public class EcommerceContext : ObjectContext {
public ObjectSet<Customer> Customers {get; set;}
public ObjectSet<Product> Products {get; set;}
// etc.
}
In the NHib examples I've seen so far, the Session object isn't used this way. Am I missing something?