Last post May 07, 2013 10:15 PM by Haixia Xie - MSFT
May 07, 2013 05:05 AM|preetipnn|LINK
I am using a WCF Data Service to insert data into the Databse via Entity Framework 5.0.
I need to insert an Object of type Employee to the Employee Table using a WebInvoke method.
But WebInvoke method is not allowing custom objects as input parameters. It says 'Only primitive data types are allowed'.
How do I pass this parameter to the service side or should I use some other method for this?
[WebInvoke(Method = "POST")]
public int AddEmployee(Employee Obj)
May 07, 2013 09:08 AM|Illeris|LINK
you could use serialization. Meaning:
Or instead of Xml serialization, you can apply json serialization, ...
May 07, 2013 12:23 PM|kushalrdalal|LINK
You can define youe employee class with DataContract -
// properties as data member here
May 07, 2013 10:15 PM|Haixia Xie - MSFT|LINK
Since this issue is related to WCF Data Service, I would suggest you post you question here
There are more professionals on this issue, so you can get better support there. Thanks for your understanding and support.