Вы на самом деле, что, где и ToList
List<Image> images = collectionDb.Images
.Where(i => i.CollectionId == id).ToList();
Select и SelectMany вернут IEnumerable<T>
предиката. Например,
IEnumerable<int> collectoinIds = collectionDb.Images
.Select(i => i.CollectionId);
Теперь SelectMany «сгладит» список объектов.
public class Test
{
IList<string> strings { get; set; }
}
...
List<Test> test = new List<Test>
{
new Test { strings = new[] { "1", "2" } },
new Test { strings = new[] { "3", "4" } },
};
IEnumerable<string> allStrings = test.SelectMany(i => i.strings);
allStrings
содержит «1», «2», «3», «4»