Int list returned by LINQ query
2 answers
Use the Select method to project the result in a different format:
var myList = myTable.Select(t => t.ID).ToList();
This should do it, note that you can also use a syntax similar to SQL:
var myList = (from t in myTable
select t.ID).ToList();
EDIT:
Also note that this is C # syntax, if you need other syntax you need to clarify which language you are using.
+7
a source to share