Hi there,
i have been successfully working with linq2sql and the linq DTOs (the classes that are created by linq2sql) ....
I am confused, i have the task of updating an old application and i can see that my DTOs will be used how they should be .... to transport date
I am using the repository pattern so i am passing data from the repository to the service via the linq2sql dtos... once i am in the service layer (this is basically my business logic) then I need to pass around class objects ..
these class objects are basicaly a mirror image (more or less) of the dtos - there are some changes in some place but generally the same..
So getting back to the question in hand! -- is this good practice to use dtos only to transport data from repository to service layer ... and once in the service layer(business logic) i should but MAPPING all my dtos to there class object counter parts (of course using automapper!!)
My other alternative is to continue to use the DTOS like class objects and pass them around from method to method and as return types etc but i feel this is bad practice and i keep going round in circles wondering which method i should apply?
Any help really appreciated
thanks