You need to use an
IQueryable<t>
as an argument to the method. In your code you are using a
List<t>
. You can make use of
AsQueryable
method to make the call. Like this:
Dt.GetObservation(LstObservation.AsQueryable());
List<t>
class does not implement the
IQueryable<t>
interface and hence you are getting the error.
Updated based on OP comment:
When you have added the service reference, the collection type was set to
Array
. This is why the method parameter is now displayed as Array. You can either configure the service reference using
Service Reference Configure dialog[
^] and then use appropriate argument type or change the method call as:
Dt.GetObservation(LstObservation.ToArray());