List<int> list = new List<int>() { 1, 2, 3, 4, };
IQueryable<int> query = list.AsQueryable();
If you don’t see the AsQueryable()
method, add a using statement for System.Linq
.
More Related Contents:
- Dynamic LINQ OrderBy on IEnumerable / IQueryable
- property remove from the list
- Returning IEnumerable vs. IQueryable
- What is the difference between IQueryable and IEnumerable?
- How to mock the limitations of EntityFramework’s implementation of IQueryable
- Using IQueryable with Linq
- Sorting a list using Lambda/Linq to objects
- Recursive control search with LINQ
- To return IQueryable or not return IQueryable [closed]
- How can I get LINQ to return the object which has the max value for a given property? [duplicate]
- LINQ to SQL and a running total on ordered results
- Linq select objects in list where exists IN (A,B,C)
- Learning about LINQ [closed]
- What’s the difference between IQueryable and IEnumerable [duplicate]
- Why use AsQueryable() instead of List()?
- Find() vs. Where().FirstOrDefault()
- How to create a dynamic LINQ join extension method
- ASP.MVC: Repository that reflects IQueryable but not Linq to SQL, DDD How To question
- “Nested foreach” vs “lambda/linq query” performance(LINQ-to-Objects) [closed]
- Linq to Objects – return pairs of numbers from list of numbers
- C# Linq where clause as a variable
- The provider for the source IQueryable doesn’t implement IAsyncQueryProvider
- LINQ identity function
- Expose IQueryable Over WCF Service
- LINQ OrderBy not ordering .. changing nothing .. why?
- Code equivalent to the ‘let’ keyword in chained LINQ extension method calls
- Extend IQueryable Where() as OR instead of AND relationship
- Linq OrderBy against specific values
- Lambda Expression for join
- Linq to objects Predicate Builder