Eric
Eric

Reputation: 3087

WCF Serialization & Interfaces

Does link text mean I have to return a concrete implementation? Even though I am using svcutil with the /r that includes my entites(where IMyInterface is defined). I get no errors but it changes all List(of IMyInterface) to list(of Object) and I cannot deserialize it on the client

Error: list(of object) cannot be converted to list(of IMyInterface).

Regards

_Eric

Upvotes: 1

Views: 497

Answers (1)

Jacob Ewald
Jacob Ewald

Reputation: 2178

In short, yes. You must return a type that implements that interface. There's nothing to be serialized when passing an interface, there's no object to break down and pass over the wire, just list of properties and methods that need implemented.

Upvotes: 2

Related Questions