I have developed an application with following layers:
- Data access layer based on fluent nHibernate
- Business rules
- activity layer(more abstract than business rules and use some business rules)
- service layer based on WCF that sends some DTOs to the outside world and recieves DTOs.
so when some DTO came back, I can map the DTO to business objects in the service layer and made my application to work with business objects. in that case when some function in lower layers executes it does not know any thing about the old object, so it become hard to handle and verify state changing and also there is class explosion for DTO adapters. on the other hand if dto is mapped to business object on the higher layers, when it came down, the lower layers did not know anything about the service which is called, so they can not unserstand how this dto must change the business objects(1 DTO might be used by different services in different ways)
so the question is what is the real solution??