LINQ errors
14-Sep-1111 Leave a comment
Error:
- ‘First’ is not a member of ‘System.Data.EnumerableRowCollection(Of System.Data.DataRow)
- “Definition of method ‘GroupBy’ is not accessible in this context”
- ‘ToList’ is not a member of ‘System.Linq.Iqueryable(Of T)’
Solution:
Imports System.Linq
Also ensure that the DataSet is up to date. Use Run Custom Tool on the DataSet to ensure this.
Then ensure there is a reference to “System.Data.DataSetExtensions”.
See MSDN “How to Create a LINQ Project”
http://msdn.microsoft.com/en-us/library/bb546156.aspx
See MSDN 101 LINQ Samples
http://msdn.microsoft.com/en-us/vbasic/bb688088