Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning record versus fields only
Message
From
10/04/2012 02:56:43
 
 
To
09/04/2012 18:58:04
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01540661
Message ID:
01540775
Views:
36
>>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 ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform