Hello World
Hello World

Reputation: 1

Can DTO in MVC asp.net load data by itself

Consider that I have DTO for view. At domain layer we have the entity . We can use automapper to fill the DTO from entity. But do we need to perform all these at application service class or can we have method at Model which can be called by Controller to perform this process. I need to know the class structure for MVC

Upvotes: 0

Views: 126

Answers (1)

Amir Molaei
Amir Molaei

Reputation: 3810

Regarding adding the mapping methods to Models, I would disagree and suggest to keep the Entity classes as simple as possible (POCO). I personally prefer to do the mapping either at Application Service Layer or in ViewModels.

Upvotes: 1

Related Questions