WCF Data Services ODATA
===

I am working on WCF Data Services. I have a function in my service which adds a record into a table in SQL DB and return the ID of the Inserted record.

I Used to Pass the values to be inserted in the form of Parameters to the Function.

For Example: public int Add(string Name, string Password)
             {
              Here I will Add the record and return the ID of the record added in DB
             }

But I dont want to do this way of passing in the form of parameters.

I want to pass the object directly.

Like: public int Add(User user)
      {
        Here I will Add the record and return the ID of the record added in DB
      }

I wrote the function like above in my services and my services project is successfull. When I update my ServiceRefrences I get Error. It says only primitive types are supported. Is there any work around this problem.

Thanks For Your Time in Answering my Question. 
   
