title: NHibernate: why do non-persistent properties have to be marked as virtual for lazy loading
body: <p>I kind of get that in order to allow lazy loading, NHibernate needs to generate a proxy class which extends the POCO class. And so I guess NHibernate needs to override the implementation of the persisted properties, and you have to mark them as virtual.</p>
  
  <p>What I don't get is why I have to go round marking almost everything else as virtual as well. For example, I had to mark an IsValid property, which refers to the other properties but obviously isn't itself persistent, and bizarrely I had to mark all the events the class can emit as virtual too.</p>
  
  <p>Anyone know why this is? I'm just curious.</p>
  
  <p>Thanks</p>
  
  <p>David</p>