Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB, C#, and VFP data handling examples
Message
De
05/05/2007 04:05:55
 
 
À
04/05/2007 16:44:23
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01215120
Message ID:
01222713
Vues:
27
>>your preference for Typed DataSets rules in April 2007...
>>
>>In LINQ to DataSets (as of today), if you query against an untyped datatable...
>>
>>
>>var Query =
>>   from rowData in dtWorkers.AsEnumerable()
>>      where rowData.Field<string>("FirstName") == "Kevin"
>>       || rowData.Field<decimal>("Salary") > 90000
>> select rowData;
>>
>>
>>If you query against a typed datatable...
>>
>>
>>var Query =
>>   from rowData in dtWorkers.AsEnumerable()
>>      where rowData.FirstName == "Kevin"
>>       || rowData.Salary > 90000
>> select rowData;
>>
>>
>>
>>Which would you prefer?
>
>If your query returns a record, you're just bragging. ;-)

Huh. That's an or - and if "Kevin" is there the salary field doesn't even get evaluated.....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform