WCF DTO Data Contracts

In my application, I make a service call and return a populated WCF Data Contract object. I have to display this data in a grid. Is it good practice to associate a data contract with a network?

Josh

+5
source share
3 answers

Is it good to bind a data contract to a grid?

Yes. There is nothing wrong with what you do.

: , WCF, ( DTO - D ata T ransfer O bject). DataContract - , DataContract WCF . DataContract , , , , .

+9

, DTO , DTO WCF .

, DTO, :

  • DTO (, /)

  • ( INotifyPropertyChanged)

  • DTO WCF. , DTO DTO, . , DTO , , .

+2

(MVVM) (.. MVC) (javascrip).

DTO, , , DTOs - (.. , ), .

DTO - , , - , . , , , , , , , , , .

those. views often require data from more DTOs, or different views require a different subset of data from the same DTO, and in both cases the DTO should not be changed just to fit what is required by a particular view.

It is also easier to determine what are the requirements for a view if the views have a presentation model, rather than transferring the same DTO to more views.

0
source

All Articles