LINQPad still cannot find extension method 'Where' after adding System.Data.DataSetExtensions.dll
I have to join results from 2 sprocs in LINQ but got the error message: 'System.Data.DataSet' does not contain a definition for 'Where' and no extension method 'Where' accepting a first argument of type 'System.Data.DataSet' could be found (press F4 to add a using directive or assembly reference)
However after added the DataSetExtensions the error still appears.
Code:
var c = GetAllGameCategories (123);
var d = GetGameCategories(224开发者_运维百科58);
Var e = c.Where(....); // Error on this line!
Any help appreciated.
A DataSet
is a collection of DataTable
objects.
It does not directly contain any data.
You need to call .Where()
on the DataTable.
EDIT: If it isn't a typed DataTable, you'll need to call .AsEnumerable()
first.
精彩评论