Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning record versus fields only
Message
De
10/04/2012 09:07:14
 
 
À
10/04/2012 08:29:15
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:
01540795
Vues:
32
>>What is contained in oGeneric.GetClients? If it is a collection of ClientAPI.ClientService.Client then do you have a good reason to create a new instance of the type rather than just selecting the existing instance ?
>
>The idea of this change was to satisfy a requirement of a foreign provider to only query certain fields instead of the entire record. As the declarations have to remain as is, this is why I had to make sure the returned object would be exactly the same as what was already declared.

Not sure I understand. You are still creating an instance of ClientAPI.ClientService.Client and all of its fields will be present. The only difference is that everything other than FirstName and LastName will have default values.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform