Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Declaration of link objects
Message
From
07/11/2011 11:41:46
 
 
To
07/11/2011 11:27:00
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01528239
Message ID:
01528263
Views:
40
>There's no such thing as a Linq variable. You used "var", so more than likely your query will return an IQueryable result. That result won't be executed until you enumerate over the items.
>
>
>   var result = from person in people
>                        where person.FirstName == "Grover"
>                        select person;
>
>  //var is of type IQueryable and the query has yet to be executed...
>
>  result = result.Where(person => person.LastName=="Lipscomb");
>
>  //still IQueryable and it has not yet been executed...
>
>  foreach (var person in result)
>  {
>     person.Ban();
>  }
>
>  //Now it has been executed since you enumerated the results.
>
Interesting data you used in your example. lol

Thanks for the info
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform