问题
Developing n-layered application with DDD (o better DDDD because we are using WCF) using Microsoft technology (where we have full controll of all component), the best choise seems to be STE vs POCO (this last one force the usage of DTOs). That's right? In your opinion make sense the usage of STE with DTOs where we need them?
Thanks.
回答1:
I really can recommend Julie Lerman's Programming Entity Framework. She goes in depth about simple poco's, dto's and Self Tracking Entities. Advantages and disadvantages are described. But off course depending a lot on application requirements and personal taste.
So I can't give you an exact answer because the question is to general for that. But reading the book should give you a taste of the possible alternatives and can help you in making these kind of design decisions. I'm working with Self Tracking Entities in combination with a Business Access Layer, Serive Layer, WCF, Win / WPF clients. And expanding it in the future most probably with ASP.NET
来源:https://stackoverflow.com/questions/6445651/ddd-using-ste-vs-poco