I understand that it's better if objects are not responsible for their own persistence (makes testing the objects easier, plus separation of responsibilities), but then what object should handle persistence of domain objects, and what should the persistence API look like at a high-level?
+4
A:
The design pattern for persistence ignorance is called a Repository
.
There is a fairly good writeup on MSDN.
Oded
2010-07-26 15:36:44