Expressions against Lambdas

I know what a Lambda expression is.

But I'm not sure if this is the same as Expression. It seems here to know more than I know.

I watch IQueryable wrapping and use expressions a lot. So, for example, is there more Expression here than you might think in Lambda?

public InterceptedQuery(InterceptingProvider provider, Expression expression) 
{ 
    this._provider = provider; 
    this._expression = expression; 
}  
+5
source share
2 answers

A lambda expression is a compiler function that is compiled depending on the context into one of two things:

  • A (hidden) function and delegate to it
  • An Expression

, - , .

,

"", Lambda

( , , , , ..). ( , - , Entity Framework) SQL.

+4

Lambdas , " " (AST), .. , . IQueryable Expression, AST , , SQL-, . IQueryableProviders, SQL (Linq2Sql), JavaScript, OpenGL (Bling) ..

# , :

void Foo(Expression<Func<int>>) { ... }
...
Foo(() => 3);
+1

All Articles