Created
October 26, 2012 08:16
-
-
Save kjellski/3957582 to your computer and use it in GitHub Desktop.
Get an A with the smallest Count of Condition satisfied on B
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
SetA.Select(m => new { | |
A = m, | |
Count = m.SetB.Where(n => n.Condition == true).Count() | |
}).OrderBy(m => m.Count).Select(m => m.A).First() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment