2
votes

Here is the scenario:

  1. There are some domain objects
  2. There are some WCF services exposing business services that interact with these domain objects
  3. There is a WPF application that is the UI, which calls the WCF services

A pretty common set-up I would have thought. I am thinking of using DTOs between the WCF service and WPF app. There would be a mapper to map between the domain objects and the DTO on the WCF service layer. You then receive this DTO object on the client and then map this to the ViewModel used by the WPF app.

Does this look sensible?

Thanks

1

1 Answers

2
votes

As it should be done in my book. You don't use domain entities in your UI layer.

Look into AutoMapper to aid with the mapping back and forth.