私はEF にいくつかの (s)を持つクラスを持っRoom
ています。EF から取得したof を持っています。このコードを使用して、 of s ( )内のすべての s に到達します。Bed
Room
Bed
Collection
Room
context
Bed
Collection
Room
myRooms
IEnumerable<Room> myRooms=...
IEnumerable<Bed> bedsInMyRoom=context.Beds.AsEnumerable();
foreach (IEnumerable<Bed> beds in myRooms.Beds)
{
if(beds!=null && beds.Any())
bedsInMyRoom=bedsInMyRoom.Concat(beds);
}
これを行うためのパフォーマンスの良い方法はありますか?