It's official: From… Select

Posted Fri, May 5 2006 19:49 by bill
Yah !! the good news is that VB will be going with the From.. Select style of syntax in Orcas rather than Select.. From.
 
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.
 
Some nice variations on it might mean that even the Select clause could be optional. For example:
 
        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"
 
 
 
 
 
 
Filed under: , ,

Comments

# Linq up that Webservice

Monday, May 15, 2006 8:40 PM by Nick Randolph's .NET Travels

As with many developers around the globe I downloaded the latest CTP of the Linq technology preview last...