Use the power of let in your LINQ queries
Posted by: Fabrice's weblog,
on 05 Dec 2007 |
View original | Bookmarked: 0 time(s)
Often, when you try to find out how to write the correct LINQ query
you need, you end up being confused because it becomes too complex. In
such situations, you should remember that the let clause is here to help you.
Let's see is an example from the official LINQ forum.Someone asked how to query the following XML document:
<cars> <car name="Toyota Coupe"> <profile name="Vendor" value="Toyota"/> <profile name="Model" value="Celica"/> ...