I am trying to understand the to Sql SelectMany. I want to use it in the query below to see how the results are generated using SelectMany as against Select. I know I can just use a select here instead...I have a table users with Id as int and location as a string. When I run the query below I get the exception "Sequence Operators not supported for type System.String". Can you please tell me how do I iterate the results that are returned by SelectMany and print the results to console.
UsersDataContext db = new UsersDataContext(); var results = db.Users.Where(u=> u.ID == 5 || u.ID == 6).SelectMany(u => u.Location); foreach (var c in results) { Console.WriteLine(c); }