Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Declaration of link objects
Message
De
07/11/2011 11:45:48
 
 
À
07/11/2011 11:09:49
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01528239
Message ID:
01528266
Vues:
35
>you can create loJobs anywhere you want. The query isn't executed until you actually use it.

It is interesting however that we can have access to the Count property even if the query hasn't been executed, thus just before the For Each loop. Because, I have this code:
Dim loJobs = (From...)

' If we have some records
If loJobs.Count > 0 Then
   ' Do something
End If

' For each record
For Each loJob In loJobs
    ' Do something
Next
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform