In the context of ASP.Net MVC 2.0, can anyone explain why we need to use a DTO (data transfer object) if there can already be models? I saw an example where a web service returns a DTO in asp.net and then converted to a model using some factory class. This web service negotiates with the database and returns the data as a DTO.
In my previous projects, I used to communicate with the database using the data context and the repository, which was used to return the model object to my controller. Then I used this model for an appropriate view. Isn't that easier? I cannot pinpoint the use of DTO pattren.
source
share