Serialize the generated class from LINQ to SQL

How to automatically serialize classes created by LINQ to SQL mapping? I need to use these objects in WCF.

.NET 3.5 SP1.

+3
source share
2 answers

On the surface of the designer, click on the background (that is, not on any particular entity) and change the "Serialization Mode" to "Unidirectional". This should add the necessary [DataContract]/ attributes [DataMember]for the entire model by enabling WCF.

+2
source

CodeDOM, , . DTO . , , , .

0

Source: https://habr.com/ru/post/1727840/


All Articles