InterviewSolution
| 1. |
How To Deal With Operation Overloading While Exposing The Wcf Services? |
|
Answer» By default overload operations (methods) are not supported in WSDL based operation. However by using Name PROPERTY of OperationContract attribute, we can deal with operation OVERLOADING scenario. [ServiceContract] Notice that both method name in the above interface is same (Add), however the Name property of the OperationContract is DIFFERENT. In this case client proxy will have two methods with different name AddInt and AddDouble. By default overload operations (methods) are not supported in WSDL based operation. However by using Name property of OperationContract attribute, we can deal with operation overloading scenario. [ServiceContract] Notice that both method name in the above interface is same (Add), however the Name property of the OperationContract is different. In this case client proxy will have two methods with different name AddInt and AddDouble. |
|