How to deal with operation overloading while exposing the WCF services ?
How to Deal with Operation Overloading while Exposing the WCF services
Hi
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Akkiraju IvaturiPosted Sep 17, 2012, 11:47 AM
By using Name property in the attribute "OperationContract" we can handle the operator overloading in the services.
As you know operator overloading means the same name with different parameter types or different in number of parameters Overloaded operations (methods) are not supported in WSDL based operation. So, the alernative is to provide different name to the operations exposed by the WCF service.
Check the following:
Here all the method names are same. But while exposing the service we are changing the operation names using OperationContract so the service still be able to get exposed with no issues.
Let me know if you have any questions.