Save() in Persistence Access Layer
As I said, the
Service layer method in Listing 1 is talking to a Unit of Work, but it’s also
talking to at least one Data Mapper class. In Listing 1, the Data Mapper class
is called POrder. Figure 3
shows an example of classes in the Persistence Access Layer.
Figure 3 Some of the classes in the Persistence Access Layer
As you saw in Figure 3, all the Data Mapper classes inherit
from the Layer Supertype  class DataMapperBase.
In this case, the Layer Supertype is exposing a lot of protected functionality
to the sub classes.
purpose of the Layer Supertype  pattern is to gather similar classes
under a superclass, for example, to generalize code.
What the Data Mapper
class POrder does in this particular
example is actually only add information to the Unit of Work. However, the
information that is typically database related is encapsulated, so that only
the Data Mapper knows about it and, for example, the Domain Model classes
don’t have to know about it at all. There is an example of a method in a Data
Mapper in Listing 2.
order As Order, _
ByVal unitOfWork As