Friday, May 05, 2006

LINQ in VB9 - From/Select, The Way Is

Panopticon Central - Select/From vs. From/Select revisited...

"We’ve been hard at work on an updated CTP of the LINQ work, and when you get it (no comment on dates at this point), you’ll notice several new things about the VB LINQ support. One the biggest is going to be the fact that, after trying all the Intellisense tricks we could think of, we’re throwing in the towel on Select/From and adopting the “Yoda style” From/Select syntax. As in:

        Dim WACusts = _

            From c In Customers _

            Where c.State = "WA" _

            Select c

instead of:

        Dim WACusts = _

            Select c _

            From c In Customers _

            Where c.State = "WA"

 
..."

NO!

Okay, I’m over it...

In reading the post, the points make sense. Full/complete Intellisense IS much more important and being "SQL like."

Having the FROM statement first is pretty easy to wrap my brain around. But I do hope the Where and Select statements can be reversed.

Something like;
FROM Object
SELECT Value
WHERE Condition

        Dim WACusts = _

            From c In Customers _

            Select c _

            Where c.State =
"WA"



Then again, maybe this is already the way it is (hence the title, "From/Select") and I should just check out the next CTP...
(’TODO: Check out next LINQ CTP)

Technorati Tags: ,

No comments: