Architectural principles we will follow
Building an extensible, testable, and maintainable data access layer is a topic very close to my heart. I cannot claim to be an expert on the topic but I have had a fair amount of success with implementing clean data access layer code using NHibernate on different projects. What has helped me get better over time is few architectural or design principles that I have discovered during this journey. I would like to introduce these principles to you briefly as I am going to base most conversations in this chapter and next on these principles. At first, some of the principles sound unnecessarily complex but my experience with these is that in the long run these are always beneficial.
No anaemic domain model
An anaemic domain model does not have much in terms of behavior. You have got classes with relationships between them which correctly represent the business domain. But inside these classes you have got bunch of getter/setter properties and nothing more...