Archive for the ‘Exception’ Category

Entity Framework : Exception using OrderBy() in Dynamic LINQ

August 12, 2011

Using OrderBy(“ColumnName”)

Exception : ‘ColumnName’¬†could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly., near simple identifier!

The solution : Always, should not miss “it” to prefix there in all the Dynamic LINQ. Hence, OrderBy(“it.ColumnName”)