A Coder
A Coder

Reputation: 3046

FindAll using Lambda expression in LINQ

I'm using lambda expression in LINQ. When i build it shows

'No overload for method FindAll takes 0 arguments'

//Code:

        List<Dispatch> lstDispatch = dataLayer.LoadDispatchDetails(val);

       lstDispatch = lstDispatch.FindAll().Where(dispatch => dispatch.InvoiceStatus != "Delivered" && dispatch.IsActive=1);

Why?

Upvotes: 0

Views: 9264

Answers (1)

L.B
L.B

Reputation: 116118

You invoke FindAll without any predicate. It should be something like this

var result = lstDispatch.FindAll(dispatch => dispatch.InvoiceStatus != "Delivered" && dispatch.IsActive==1);

Upvotes: 4

Related Questions