Plain Old CLR Object vs Data Transfer Object

后端 未结 10 1567
挽巷
挽巷 2020-11-22 13:38

POCO = Plain Old CLR (or better: Class) Object

DTO = Data Transfer Object

In this post there is a difference, but frankly most of the blogs I read describe P

10条回答
  •  感情败类
    2020-11-22 14:10

    A primary use case for a DTO is in returning data from a web service. In this instance, POCO and DTO are equivalent. Any behavior in the POCO would be removed when it is returned from a web service, so it doesn't really matter whether or not it has behavior.

提交回复
热议问题