Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning all the fields
Message
De
25/02/2012 13:13:09
 
 
À
25/02/2012 10:50:32
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:
01536260
Message ID:
01536554
Vues:
35
>>>>>>Using Link, from the Select clause, what would be the syntax to return all the fields? The Table.* syntax does not work.
>>>>>
>>>>>
>>>>>If you want all fields, just eliminate the select. It will return everything by default.
>>>>
>>>>Hi,
>>>>
>>>>Can you give an example. I'm assuming the question refers to 'Linq to Sql' which I've not used but I thought that a linq expression always required a Select (or maybe a GroupBy) clause ?
>>>
>>>List.Where(w=>w.??? == ????).Select (s=>s) is the same as List.Where(w=>w.??? == ????)
>>
>>Ah, method syntax. I was thinking of query syntax...
>
>
>I hardly ever use query syntax. I had to one time on a phone project where i couldn't make the fluent syntax work. I prefer it over query ...

Me too but AFAIK they are identical performance wise. That said MS seem to recommend query syntax:
http://msdn.microsoft.com/en-us/library/bb397947.aspx
"In general, we recommend query syntax because it is usually simpler and more readable;"
And there are some things that are only available via method syntax.
Oh well....
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform