WCF C # WebInvoke Operation contract error

1

Good afternoon, I have a problem when I try to create a method that takes 2 parameters, although in the operationcontract I specify that I use Wrapped anyway I get the error as if I did not have it.

Could you help me please ???

Interface:

[WebInvoke(BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = 
"/DaysDeleteBusinessDay", RequestFormat = WebMessageFormat.Json, 
ResponseFormat = WebMessageFormat.Json, Method = "POST")]
[OperationContract]
void DaysDeleteBusinessDay(int BusinessesId, int Id);

Service:

[WebInvoke]
public void DaysDeleteBusinessDay(int BusinessesId, int Id)
{
    Logic.LogicFabric.GetLogicDays().DeleteBusinessDay(BusinessesId, Id);
}

    
asked by Christian Gonzalez 01.11.2017 в 22:02
source

1 answer

0

I managed to solve the problem, I added this (below) to the definition of the method in the service, and it worked perfectly.

[WebInvoke(BodyStyle = WebMessageBodyStyle.Wrapped)]
public void DaysDeleteBusinessDay(int BusinessesId, int Id)

Thank you!

    
answered by 02.11.2017 в 21:29