简体   繁体   中英

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?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM