Expression of type <type> is not queryable
Expression of type <type> is not queryable. Make sure you are not missing an assembly reference and/or namespace import for the LINQ provider.
Queryable types are defined in the System.Linq, System.Data.Linq, and System.Xml.Linq namespaces. You must import one or more of these namespaces to perform LINQ queries.
The System.Linq namespace enables you to query objects such as collections and arrays by using LINQ.
The System.Data.Linq namespace enables you to query ADO.NET Datasets and SQL Server databases by using LINQ.
The System.Xml.Linq namespace enables you to query XML by using LINQ and to use XML features in Visual Basic.
Error ID: BC36593
To correct this error
Add an Import statement for the System.Linq, System.Data.Linq, or System.Xml.Linq namespace to your code file. You can also import namespaces for your project by using the References page of the Project Designer (My Project).
Ensure that the type that you have identified as the source of your query is a queryable type. That is, a type that implements IEnumerable<T> or IQueryable<T>.
See Also
Concepts
Introduction to LINQ in Visual Basic
References and the Imports Statement
Reference
Imports Statement (.NET Namespace and Type)
References Page, Project Designer (Visual Basic)