It's official: From… Select
Posted
Fri, May 5 2006 19:49
by
bill
The From ..Select syntax has many advantages, the biggest being a great intellisense story. I also think it is good is distinguishes itself from TSql, because although DLinq may use TSql, LINQ itself does not.
Dim WACusts = _
From c In Customers _
Where c.State = "WA" _
Select c
Could be written as :
Dim WACusts = _
From c In Customers _
Where c.State = "WA"
As the Select c is really superfulous.
Further we can even make the "From" bit implied when doing loops:
For Each c As Customer In Customers Where c.State = "WA"