DTO = ViewModel?

前端 未结 8 574
别跟我提以往
别跟我提以往 2020-12-04 07:11

I\'m using NHibernate to persist my domain objects. To keep things simple I\'m using an ASP.NET MVC project as both my presentation layer, and my service layer.

I wa

8条回答
  •  醉酒成梦
    2020-12-04 07:46

    For some simple views I'll use my DTO as my models, but as Views become more complex I'll create ViewModels.

    For me it is a balance between quickness (using DTO, since I already have 'em) and flexibility (creating ViewModels means more separation of concerns).

提交回复
热议问题