Night Walker
Night Walker

Reputation: 21280

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?

Upvotes: 2

Views: 1472

Answers (2)

TSmith
TSmith

Reputation: 543

Put your Service DTOs in a seperate Service.Dto project that should live at the SIL. Also, your phrasing probably confused people when you said "passes DTOs to UI". You probably meant passes DTOs to service clients.

Upvotes: 0

Ofer Zelig
Ofer Zelig

Reputation: 17508

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.

Upvotes: 3

Related Questions