Assembly: System.Core (in System.Core.dll)
public static IQueryable AsQueryable( this IEnumerable source )
public: [ExtensionAttribute] static IQueryable^ AsQueryable( IEnumerable^ source )
static member AsQueryable : source:IEnumerable -> IQueryable
<ExtensionAttribute> Public Shared Function AsQueryable ( source As IEnumerable ) As IQueryable
A sequence to convert.
An IQueryable that represents the input sequence.
If the type of source implements IQueryable, returns it directly. Otherwise, it returns an IQueryable that executes queries by calling the equivalent query operator methods in Enumerable instead of those in Queryable.
This method assumes that source implements IEnumerable for some T. At runtime, the result is of type IQueryable for the same T. This method is useful in dynamic scenarios when you do not statically know the type of T.
Available since 8
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Available since 8.1