• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 137
  • Last Modified:

How to get a value from my data that is being returned.

I am working with C#. I am calling a service that returns what looks like rows in a table. I need to know how to get only one value. The value is for
the "ClubName" How can I do this? Below is my C# code and the contents the ClientClub var variable.


var clientClub = ClientService.GetClubs(); // C# code

When I hover over in the debugger or do a quick watch, this comes back:

clientClub = {SELECT [t0].[ClubID] AS [ClubId], [t0].[ClubCode] AS [Code], [t0].[ClubName] AS [Name], [t0].[ClubDescription] AS [Description], [t0].[SortOrder]
FROM [dbo].[Club] AS [t0]
ORDER BY [t0].[SortOrder]
var clientClub = ClientService.GetClubs(); // C# code see contents in the debugger below:
//The stuff below appears when I hover over my clientClub variable in the debugger.
clientClub = {SELECT [t0].[ClubID] AS [ClubId], [t0].[ClubCode] AS [Code], [t0].[ClubName] AS [Name], [t0].[ClubDescription] AS [Description], [t0].[SortOrder]
FROM [dbo].[Club] AS [t0]
ORDER BY [t0].[SortOrder]

Open in new window

0
brgdotnet
Asked:
brgdotnet
1 Solution
 
Ivo StoykovCommented:
try this
HTH
i

clientClub = {SELECT [t0].[ClubName] AS [Name] FROM [dbo].[Club] AS [t0] ORDER BY [t0].[SortOrder]}

Open in new window

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now