I am trying to convert these nested foreach loop to LINQ but output is coming in form of IEnumerable<BPAddress>. Is there any solution?
foreach (var cmt in BPAddresss)
{
foreach (var t in cmt.BPPhones)
{
if (t.PHON_NUMB.Length> 11)
{
}
}
}
LINQ Code
var k37 = Target.BPAddresss.Where(x => x.BPPhones.Where(y => y.PHON_NUMB.Length > 11).Count() > 0);