-1

I was just calling a service reference method, I noticed that the method has a lot of parameters in its signature, Whereas there exists a request class related to the same service.

If I'm not making mistake in calling method so why there is a request model?

        var client = new AtlasjetClient();
        var result = await client.airportsListAsync("USER", "PASS");

the result is type of airportsListResponse but there is also a airportsListRequest class in service reference. WHY?

behzad chhizari
  • 134
  • 1
  • 9
  • Did you update the service reference somewhen? Probably the method signature changed and it didn't delete the old generated classes. – Dominik Jun 24 '19 at 14:21
  • 1
    What is your client framework? On my side, it did not generate the Request class, client proxy class doesn’t need this, only ClientBase abstract class. The other class might be DataContract class, which is used to pass the parameters(data).https://learn.microsoft.com/en-us/dotnet/framework/wcf/feature-details/using-data-contracts – Abraham Qian Jun 25 '19 at 06:17

1 Answers1

0

I'm not sure what you are asking. I'm guessing the method airportsListAsync allows you to pass that class airportsListRequest as its parameter. Something like:

AirportsListRequest airportsListRequest = new airportsListRequest() 
{
    property... = value...,
};

var result = await client.airportsListAsync(airportsListRequest);

but like I've said, I'm just guessing.

Eduardo Silva
  • 615
  • 3
  • 5