Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9234377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:46:33+00:00 2026-06-18T06:46:33+00:00

i have one stupid problem and I’m not sure how to fix it. I

  • 0

i have one stupid problem and I’m not sure how to fix it.

I work with Silverlight and Visual Studio 2010. To connect to a database i used
LINQ to SQL. So far so good. Everything works fine, but at the end the result i get is
a query string and no value.

My code in the WCF Service file:

public string get_info()
{
    LinqMapInfoDataContext context = new LinqMapInfoDataContext();
    var result = from x in context.mytabel
                 where (x.map_x == 4) && (x.map_y == 7)
                 select x.id;
    string returnValue = result.ToString();
    return returnValue;
}

and my code in mainpage.xaml.cs

private void ser_client_get_infoCompleted(object sender, ServiceRefMapInfo.get_infoCompletedEventArgs e)
{
    lbl_key.Content = e.Result.ToString();
}

Well, i really thought i would get “id” (a concrete string value) shown in my browser after compiling my project, but no. lbl_key.Content shows:

SELECT [t0].[id] FROM [dbo].[mytable] AS [t0]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T06:46:34+00:00Added an answer on June 18, 2026 at 6:46 am

    Your code should be:

    var id = result.FirstOrDefault();
    string returnValue = Convert.ToString(id);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with the Python logging module, I'm not sure if I'm
I have what I consider to be a stupid problem with a simple Silverlight
Possible stupid question: let's say I have two apps contained within one project. Can
i have a (perhaps stupid) question: im using 2 threads, one is writing floats
I have one problem with parsing *.docx document with OpenXML (C#). So, here's my
I'm struggling big time with a stupid problem which i can't seem to fix.
I have a somewhat stupid problem because it's supposed to be utterly simple ...
I have a stupid problem due to my lack of knowledge about C++ templates.
I have a little (and stupid) problem: I'm building a PHP application using mysqli
I have been check many close answers here, no one can solve my stupid

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.