I have a complex class structure that can be returned from my get call.
The call is defined as public FanBase Get(int id) which is mapped to a url of /FanObject/id.
There are 8 classes that are derived from FanBase and any of them can be returned on the call.
How can I use ReadAsDataContract to deserialize the correct object? The object being returned is correctly represented in the XML. All the classes are in a schema/data contract library that both the client and the server have access to.
I've tried using ReadAsDataContract setting it to the base type and provided an array of all the other possible types.
It still throws a serialization error about not being able to resovle the correct type.