Deserialization on client side in Domain Service
- by ankit
I have 2 classes: Person and Contact.
Person class has a property named ContactNumber which returns the Contact type, and this property is marked as a DataMember for serialization.
I have marked Contact type as a DataContract.
On the client side I am able to get the values, but when I try to insert a value and then do submit, I get the following exception:
Failed to deserialize change-set. Failed to convert value of type 'Dictionary`2' to type 'Contact'
Stack Trace is:
at System.Web.Ria.DataServiceSubmitRequest.GetChangeSet(DomainService domainService)
at System.Web.Ria.DataServiceSubmitRequest.Invoke(DomainService domainService)
at System.Web.Ria.DataService.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
Can anyone give me the solution ?