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

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -