Top "Expression-trees" questions

Expression Trees are an abstract representation of code in a tree structure where each node of the tree represents a programming construct (conditional, assignment, method call, etc.

How to create LINQ Expression Tree to select an anonymous type

I would like to generate the following select statement dynamically using expression trees: var v = from c in Countries where …

c# linq entity-framework linq-to-entities expression-trees
LINQ to Entities only supports casting EDM primitive or enumeration types with IEntity interface

I have the following generic extension method: public static T GetById<T>(this IQueryable<T> collection, …

c# .net entity-framework expression-trees dbcontext
How to evaluate an expression in prefix notation

I am trying to evaluate a list that represents an expression in prefix notation. Here is an example of such …

expression-trees evaluation s-expression
Expression.Lambda and query generation at runtime, simplest "Where" example

I was trying to generate a simple Lambda Expression at runtime with no luck... something like this: var result = queryableData.…

c# .net lambda expression-trees dynamic-language-runtime
Practical use of expression trees

Expression trees are a nice feature, but what are its practical uses? Can they be used for some sort of …

c# expression-trees
How do I set a field value in an C# Expression tree?

Given: FieldInfo field = <some valid string field on type T>; ParameterExpression targetExp = Expression.Parameter(typeof(T), "target"); ParameterExpression …

c# lambda expression-trees
Expression trees for dummies?

I am the dummy in this scenario. I've tried to read on Google what these are but I just don't …

c# .net linq expression-trees
variable '' of type '' referenced from scope '', but it is not defined

Well, the following code is self-explaining; I want to combine two expressions into one using And operator. The last line …

c# expression-trees
How do I dynamically create an Expression<Func<MyClass, bool>> predicate?

How would I go about using an Expression Tree to dynamically create a predicate that looks something like... (p.Length== 5) &…

c# linq lambda expression-trees