Because I used a generic data contract with the same name, an error will be reported,
System. invalidoperationexception: An exception occurs when calling the WSDL export Extension: system. servicemodel. description. datacontractserializeroperationbehavior
Agreement: http://tempuri.org/:IRetriever ----> system. invalidoperationexception: The type "EC. datamodel. paging '1 [[EC. datamodel. productproperty, EC. datamodel, version = 4.0.0.0, culture = neutral, publickeytoken = NULL] "datacontract is added to datacontractset, because the existing data protocol name is also the namespace" Protocol, EC. datamodel, version = 4 . 0.0.0, culture = neutral, publickeytoken = NULL] ", and these protocols are not equivalent.
In system. runtime. serialization. datacontractset. Add (xmlqualifiedname, datacontract)
Solution:
Custom generic data protocol name
[datacontract (name = " drawing_using _ {1} _ brush_and _ {0} _ shape ")]
Public class drawing
{< br> // code not shown.
}