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

LVL 2
brgdotnetcontractorAsked:
Who is Participating?
 
Ivo StoykovConnect With a Mentor Commented:
try this
HTH
i

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

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.