Other than having the select last, it looks alot like SQL.
BTW, the select is last simply for Intellisense. The VB team originally it first, but intellisense just wasn't working, so they did what the C# team did all along and put it last. So, it's bass ackwards for a reason.
Really, there is little jumping through hoops to see results. Think of it this way. It's roughly equivalent to macro expansion in VFP. You store to a variable what you want to happen, then you execute it. In LINQ, it's called delayed execution. It you need the data right away, just tackon a .ToList().
I've found LINQ to be a much better solution in most cases to doing things the older way. And if you're using EF, LINQ is almost required.
>Craig
>
>
>var Found = from o in Orders
> where o.CustomerID == 84
> select new {
> o.OrderID,
> o.Cost,
> CostWithTax = o.Cost * 1.1
> };
>
>There is nothing in this code that is not weird to me.
>Then having to go thru hoops to look at results is even more weird.
>It's much easier for me to pretend it isn't there.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer