Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning record versus fields only
Message
De
10/04/2012 12:26:07
 
 
À
10/04/2012 12:01:40
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:
01540661
Message ID:
01540826
Vues:
27
>>That won't be the case - but whether the overhead of also transferring the unused fields is acceptable will, I guess, depend on how many other fields there are and how the defaults are defined.....
>
>So, the code I have presently still transfer those "not mentioned" fields in the query across the wire.

Yes

>Ok, so, is the code you mentioned in the previous message the approach to go to only have the FirstName and LastName fields to be transferred across the wire or that will not be able at all because I am using a public declaration and not one specific to the query?

The first approach relies on defining a simple public class with just the two fields. The second approach would not be of any use since the anonymous type would not be recognized outside the method in which it is created. There may be other options but I don't know what the 'consumer' of the FirstName/LastName will be - or where it will reside......
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform