Verifying NHibernate Entities Contain Only Virtual Members

added by Matt_TCF
6/28/2011 9:59:10 PM

96 Views

One requirement that NHibernate imposes on your object model is that all public members must be virtual in order to support lazy loading. I got really tired of getting a yellow-screen-of-death while working on Fail Tracker every time I added a new member to my domain and forgot to mark it as virtual. So, I added a simple NUnit test to enforce the convention.


0 comments