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

  • SEARCH
  • Home
  • 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 6910355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:48:14+00:00 2026-05-27T08:48:14+00:00

Up front, the guy on the keyboard here is way overdue on the sleep

  • 0

Up front, the guy on the keyboard here is way overdue on the sleep department. But also kinda desperate.

I have a Data-service [WebGet] method, setup like this.

[WebGet]
public string Finalize(string PayloadObject, string CltUUID, string Comment){..}

It return a simple string, depending on the outcome of the execution inside. This is working fine.

I call it like this

var res = base.ServiceRef.CreateQuery<DBcontext>("Finalize")
.AddQueryOption("PayloadObject", string.Format("'{0}'", builder.ToString()))
...

How do I get this query to materialize?
Usually one uses res.ToList(), ToArray() or .First(). If I do, I get an exception. Using .ToString() does not execute the query, just returns the url.

The query works, if I break in a line after this code and click ‘View…’ in the debugger, the query is executed, the method runs on the server.

It seems I just don’t get it to run, what am I missing?? besides sleep

Thanks for any pointers

Regards, Andreas

  • 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-05-27T08:48:15+00:00Added an answer on May 27, 2026 at 8:48 am

    I think you cannot use CreateQuery to call operation returning single value. You must use Execute instead. MSDN documentation also mentions that operations returning primitive types cannot use QueryOption which make sense because query option is used to define query for IQueryable. If you need to pass parameters try to use common WCF REST approach to specify template in WebGet and on client side use the URI with parameters correctly included.

    You can also try to use SingleResultAttribute on your service operation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've seen this about a bazillion times but I'm a front-end guy and writing
First off I'm a total Rails newbie (front-end guy looking to learn rails), so
I have made a front end for a program which test java (foo.class) binary
Bottom Line Up Front Is there a succinct way that I can constrain the
I apologize up front for the broadness of this question, but I'm wondering if
Okay, so I'm not a Java guy, but I work with loads of them.
our front end guy needs to form a url containing the hash, (i.e, http://blah/#some-link
I'm having an issue where I'm helping my front end development guy change a
I have a website that my company hosted using hubspot.. now the guy who
I have an Access front end and a MySQL back end. Is it possible

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.