Do I need to implement INotifyPropertyChanged when using DTO and WPF?

My question is quite simple and already asked in the title.

Here's the context: I have a domain with entities and repositories. The result of the request is displayed in the DTO and sent to the graphical interface.

The GUI is implemented using WPF and for comparison I need classes that implement INotifyPropertyChanged.

My first idea is to have a DTO that implements this interface, because I foresee a lot of work to again map my DTO to elements that implement INotifyPropertyChanged.

Is this a good practice? I have not seen this trap? What is the “official” good practice for this situation?

+5
source share
3 answers

DTO , , . - , . , , / WCF, , , Id,

Model, INotifyPropertyChanged IDataErrorInfo , DTO . - AutoMapper DTO

+10

, DTO, INPC.

INPC .net impl, , , , , (, DTO)

NotifyPropertyWeaver, .

, DTO , , DTO.

DTO , DTO . PropertyChanged, , DTO (http://msdn.microsoft.com/en-us/library/ms978717.aspx) , .

, DTO . (http://martinfowler.com/eaaCatalog/dataTransferObject.html) , .

INPC !

+2

​​WPF MVVM (Model-View-ViewModel). DTO . , ViewModel, , , . , , , . , , (, Automapper).

0

All Articles