I have a datacontract called Customer and have 2 OperationContract contracts like CreateCustomer() and UpdateCustomer() which takes Customer as data contract.
Now, i need to hide some of the properties of Customer datacontract in UpdateCustomer(). For example, there is a property called SSN in Customer data contract. This property should be visible in CreateCustomer() and should not be available in UpdateCustomer() for updation. Any idea, how to do it ?
Do we need to have seperate data contract object for both OperationContract?
Thanks in advance!
Bala
You would need two separate classes, one for the
UpdateCustomercall that contains only those properties that call should see, and another for theCreateCustomercall with all of this (this can inherit from the previous class, obviuosly):And then your calls need to take those classes: