Search code examples
wcfdton-tier-architecture

Physical location of DTO in a project


I have a WCF service layer in my application that passes DTOs to UI.

Where is the best place to place my DTO classes in the project, should they have different folder called DTO or is it OK to place then in the folder in which the service using them is located?


Solution

  • Put them in a separate assembly (notice - not just a folder, a dedicated assembly) which both the UI layer and the Service layer can access. I usually call this layer Entities, and it BTW usually contains other things also.