RahulSisodia
New member
- Joined
- Nov 25, 2009
- Messages
- 3
- Programming Experience
- 5-10
I have a query about implementing Data Transfer Objects.
I have a common interface but their implementation differs at the DAL level. Please consider below example.
Webpage calls a Service to get list of addresses by postcode. One service/interface implementation calls our Core database and generates the list of Address as business entity and passes back to the webpage.
Now another service implements the same interface and returns the data into datatable or say multiple byref string values; my requirement is I do not want to change my webpage implementation; want to write a wrapper which will convert datatable into Address business entity? I want to write a generic mechanism for this so that different implementations can be handled intelligently rather than mapping column to business properties.
Regards,
Rahul.
I have a common interface but their implementation differs at the DAL level. Please consider below example.
Webpage calls a Service to get list of addresses by postcode. One service/interface implementation calls our Core database and generates the list of Address as business entity and passes back to the webpage.
Now another service implements the same interface and returns the data into datatable or say multiple byref string values; my requirement is I do not want to change my webpage implementation; want to write a wrapper which will convert datatable into Address business entity? I want to write a generic mechanism for this so that different implementations can be handled intelligently rather than mapping column to business properties.
Regards,
Rahul.