Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning record versus fields only
Message
De
10/04/2012 02:56:43
 
 
À
09/04/2012 18:58:04
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:
01540775
Vues:
37
>>The syntax is C# and I wasn't sure if it was valid or not with VB. Basically what it does is create a new ClientAPI.ClientService.Client and set the FirstName and LastName properties based on the values you select. I think the following might be the correct VB syntax:
oClient = (From c
>>                 In oGeneric.GetClients()
>>                 Where c.Id = nClientID
>>                 Select new ClientAPI.ClientService.Client With { .FirstName = c.FirstName, .LastName = c.cLastName} ).FirstOrDefault()
>
>This is fantastic. I figured out that it was C# related. However, I was searching the net to try to find the VB.NET equivalent. I tested it and it worked exactly as you wrote.
>
>Thanks a lot

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 ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform