Given an Entity, with two fields, int? and string :
EntityId Name
-------- -----
1 Name1
2 Name2
3 Name3
4 Name4
(null) Name5
6 Name6
7 Name7
Using LINQ, how could I select the first 4 Entities, up to before the null value?
Seems like a case for
TakeWhile:(Add
ToList()orToArray()as appropriate).