c# - select rows whose sum greater than 0 using Linq -
i need do, example: select customers total sum of amount greater 0. tried below code , reference result trying fetch data. not getting proper result.
var query = (from in salelist group a.cust_ledger_entry_no groups select groups.sum( s => s.amount) > 0).tolist();
i did above query.now need data satisfying above condition.please me.
you need where
var query = in salelist group a.cust_ledger_entry_no g g.sum( s => s.amount) > 0 select new { cust_ledger_entry_no = g.key, sumamount = g.sum( s => s.amount) };
i need result like, customers sum of amount greater 0 columns
if a
customer , need select can use query:
var query = in salelist group a.cust_ledger_entry_no g g.sum( s => s.amount) > 0 customer in g // flatten each group select customer;
Comments
Post a Comment