LINQ and Entity Framework are both commonly used in the .Net ecosystem, but even well-written applications can have LINQ queries that are difficult to understand. Because LINQ is so flexible, it can be written in ways that fail to communicate the developer’s intent. Well-written LINQ should be so clear as to be self-documenting. To write clear LINQ, it helps to understand the details of a few LINQ components that improve LINQ’s readability.
2. Ed Charbeneau
Developer Advocate for Progress<Telerik>
Author<T>
Podcast => “Eat Sleep Code the Official Telerik Podcast”
Twitter.Where(user = @EdCharbeneau)
9. Runtime Modification
ExpressionVisitor
• used to traverse or rewrite expression trees
• Abstract class
– Inherit and override
• .Visit(expression)
– Recursively walks the tree
– Returns an Expression
https://msdn.microsoft.com/en-us/library/bb882521(v=vs.90).aspx
20. Lambda as an Expression tree
post => post.PostedOn >= cutoffDate
>=
cutoffDatePostedOn
GreaterThanOrEqual
=>
post
Lambda
parameter
parameter constant
Body