How to

convert IEnumerable to IQueryable

Published: 14. February 2012 | Updated: 14. February 2012
License: Microsoft Public License (MS-PL)
Categories: Collections » Linq
Tags: C# Collections Linq
Was this snippet helpful for you? YESYES / NONO

Import namespaces

using System;
using System.Collections.Generic;
using System.Linq;

Code

IEnumerable<MyClass> enumerable = new MyClass[]{ /* data */ };

IQueryable<MyClass> queryable = enumerable.AsQueryable();
Send us feedback about this snippet »



Related Snippets: