Created
August 8, 2012 02:18
-
-
Save chadedrupt/3291477 to your computer and use it in GitHub Desktop.
LINQ grouped SUM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jobsOwing = from t in Db.Transactions | |
group t by t.Job into g | |
where g.Sum(t => t.Value) < 0 | |
select new { Job = g.Key, NetPosition = g.Sum(t => t.Value) }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment