There are several posts where people are asking how to merge generic lists.
However, in my case I have two seperate linq statements where I am returning two separate database results .ToList()
var appleList = (from al in db.Apples where al.Id == id select al).ToList();
var bananaList = (from bl in db.Bananas where bl.Id == id select bl).ToList();
I tried merging these list like so:
appleList.Concat(bananaList);
but this causes the following error:
'List' does not contain a definition for 'Concat'
How do I combine these two .ToList()
?