Saturday, December 25, 2010

Let.It.Be

Just another stupid question, bad for checking knowledge, but good enough to find out one's "tactical" architecture design capabilities.

It's not a secret that C# translates LINQ queries into chain of extension method calls. For instance, the following code snippet:

var entities = from e in list
               where e.Id > 10
               select e.Name;

will be transcribed as

var entities = list.Where(e=>e.Id > 10).Select(e=>e.Name);

But how is 'let' keyword transcribed? There is no .Let() method in LINQ. Could you suggest your solution?