Hello All, I have researched this to death. There does seem to be some answers here already, but frankly the answers confuse me. So I'll try to make this as basic as possible.
If I have a table in a database, "People" with a name column(string) and an age(int) column. Then I do something like this:
List<int> ages = new List<int>();
ages.Add(39);
ages.Add(40);
var result = from p in People
where ages.Contains((int)p.Age)
select p;
The syntax is passing, but returns nothing (both in VS2010 and LinqPad). Shouldn't this make a SQL statement with a where clause containing the ages in my list?
Simple answer anyone? (Ideally if you could modify my example and make it work.. that would be great!)