I originally came across this source code on Scott Guthrie's Blog while searching for a mechanism to execute dynamic linq statements against entity framework. While this code partially fulfilled my need both it and the assembly System.Linq.Dynamic.dll available for download from NuGet lacked the exact functionality I required.

While it allowed me to use syntax like this:


it did not allow me to execute a full lambda expression represented as a string against my entity objects, like this:


In addition it lacked support for Take and Union as well as many other extension functions, though these were the only two with which I was interested.

As a consequence I extended the code to support these features. I thought my efforts might benefit someone else so I have decided to host it on codeplex. The original code is licensed under Ms-PL and in accordance with this license the derived codebase I have created is licensed similarly.

To run the example you will need to have SQL Server or SQL Server Express installed as well as the Northwind Sample Database. Instructions for installing the Northwind Sample Database can be found here.

Last edited Jul 28, 2013 at 4:51 PM by dialectsoftware, version 18


jdhenckel May 1, 2015 at 3:14 PM 
For some actual documentation see http://dynamiclinq.azurewebsites.net/

jdhenckel May 1, 2015 at 3:11 PM 
This is not "documentation". Please provide a link to something helpful.

penguin_ku Jun 4, 2014 at 7:17 AM 
I download it and it works very well. But, just, i hope it support extension methods, such as DataRow. Now, i using it must like this
string query = "dTable.Where(p => Convert.ToInt32(p[\"PID\"]) > 123 && Convert.ToInt32(p[\"PID\"]) < 128)";
but i hope that like this
string query = "dTable.Where(p=>p.Field<int>(\"PID\") > 123 && p.Field<int>(\"PID\") < 128)";

I know it seems impossible to implement, I just think.
Thanks to the author, u r best.

Toanzzz May 8, 2014 at 8:22 PM 
Thank you, this is very useful