Hello,
Assume we have a Customer class which has a complex property called Address. Something like this:
public class Customer
{
public string Name { get; set; }
public Address { get; set; }
}
I need to implement Data Mapper pattern to persist Customer objects to the database. Should I have something like CustomerDataMapper that persists the Customer AND the Address or 2 different Data Mappers: CustomerDataMapper and AddressDataMapper?
I'd like to know your thoughts on this.
Cheers,
Mosh