No Lamba syntax shown if .ToList() is used
Options
A query like
show the lamba syntax of
It's not causing me a problem, but was just wondering why?
(from r in Customers where r.City == "London" select r).Dump();
show the lamba syntax of
Customers .Where (r => (r.City == "London"))but nothing is shown for the following query
(from r in Customers where r.City == "London" select r).ToList().Dump();
It's not causing me a problem, but was just wondering why?
Comments
-
In order to display the lambda syntax, LINQPad's Dump method needs to introspect the expression tree. This is not possible after you call ToList because that information is lost at that point - all you have is a list of objects.
-
Thanks