I find myself foreach-ing over IEnumerables a lot just so that I can return each result. Is there a way to compress something like this
foreach (var subSelec
No, there isn't, unless you completely replace every yield return with a single return statement using LINQ.
yield return
return
For example:
return someSet .Concat(someOtherSet.SelectMany(s => FindSingle(context, s));