Dynamic LINQ Documentation

This is a living branch of the Microsoft Dyamic LINQ library. It allows developers to construct LINQ queries using string expressions instead of lambda expressions.

New to Dynamic LINQ? Visit Getting Started

Have you ever wanted to dynamically construct queryable LINQ expressions on objects that couldn't be determined at runtime? With Dynamic LINQ, you can.

using System.Linq.Dynamic; //Import the Dynamic LINQ library

//The standard way, which requires compile-time knowledge
//of the data model
var result = myQuery
    .Where(x => x.Field1 == "SomeValue")
    .Select(x => new { x.Field1, x.Field2 });

//The Dynamic LINQ way, which lets you do the same thing
//without knowing the data model before hand
var result = myQuery
    .Select("new (Field1, Field2)");

Now you can dynamically create strings that will create your LINQ expressions that works with any data source that supports IQueryable.

Visit the Project Info page for information on obtaining the library and accessing the source code.

Work in Progress

This documentation is a work in progress. It, along with this branch of the Dynamic LINQ library, is an open source project, and as such, is worked on during developers' free time.

Please be patient while we continue to add more information and functionality to the project.


Documentation on the classes and interfaces defined in the Dynamic LINQ library, their methods, and their arguments. Includes examples and remarks.

Look at Library »


Documentation on the expressions defined in the Dynamic LINQ library. Includes examples and remarks.

Look at Expressions »

How Tos

Various examples and how tos.

Look at How Tos »