c# - Find records that have a minimum of 25 child records greater than 0 - LAMBDA -
i' m trying limit results contains @ least 25 records loadweight greater zero. (first 25 using take() ok in case).
proxylist = proxylist .where(x => x.load.loaddetaillist .take(25) .where(y => y.loadweight > 0) .tolist();
thanks in advance.
put where(y => y.loadweight > 0)
first filter out records count; skip
24 records , check if there're any
records far (i.e. 25 or more records):
proxylist = proxylist .where(x => x.load.loaddetaillist .where(y => y.loadweight > 0) .skip(24) .any()) // any: have 25th item? .tolist();
Comments
Post a Comment