views:

31

answers:

1

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