I have Room and Bed EF classes which each of Room have some Beds.when I use this LINQ statement:
IEnumerable<Room> room=...
if (room == null || !room.Any())
return null;
return room.SelectMany(r=>r.Beds);
give me this error:
Object reference not set to an instance of an object.
in return line.