Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Command window reappears for .NET
Message
From
01/08/2012 11:51:26
 
 
To
01/08/2012 11:29:36
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01549627
Message ID:
01549665
Views:
92
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 && o.Cost > 100
>            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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform