0

i have a short question to a wcf Service

I want to implement 2 Methods with the same name. But with a different amount of Parameter.

Example

[ServiceContract]
public interface ILiveLeadsService
{                
    [OperationContract]
    string AddLiveLeads(string a, string b);

    [OperationContract]
    string AddLiveLeads(string a, string b, string c);
}

What can i do that i can use this 2 Methods with the same name?

cheers Andre

Preston Guillot
  • 6,493
  • 3
  • 30
  • 40
Andre Fritzsche
  • 126
  • 2
  • 11
  • 1
    _"What can i do"_ - try to use the search. :) Alternatively you can use a Data Transfer Object with properties and evaluate the properties in the method, as opposed to creating various overloads. – CodeCaster Sep 16 '14 at 14:42
  • Hello CodeCaster im not very familiar with the WFC Services.. Can you give me a more specific example to the transfer object? Im not sure for what i have to searchhere.. – Andre Fritzsche Sep 23 '14 at 15:25
  • http://programmers.stackexchange.com/questions/189019/are-request-response-parameter-wrappers-good-practice, http://msdn.microsoft.com/en-us/library/vstudio/hh273127(v=vs.100).aspx, http://msdn.microsoft.com/en-us/library/dn132654.aspx – CodeCaster Sep 23 '14 at 15:32

0 Answers0