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 7981019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:14:43+00:00 2026-06-04T10:14:43+00:00

I am trying task using WCFDataServices. I have a Service operation Like [WebInvoke(Method=POST)] Public

  • 0

I am trying task using WCFDataServices.

I have a Service operation Like

[WebInvoke(Method=”POST”)]

Public bool Add(string x1, string x2, string x3)

{

// ADDS a NEW RECORD TO DB. AND IF THE ADDITION IS SUCCESSFULL RETURs true or false

}

In my MVC Client Application. In the repository I have Function to Add Like

public bool Add(string y1, string y2, string y3)

{

// HERE I WANT to EXECUTE THE URI AND CAPUTURE THE RETURNED VALUE. AND PASS IT TO MY CONTROLLER TO SHOW SOME ACTION IN THE VIEW.

}

I dont have any problem in the service. It returns the boolean value as expected.

I couldnt figure out how i can capture the returned boolean value in my Repository Method.

// OperationResponse x = dsContext.Execute(requestUri, Microsoft.Data.OData.HttpMethod.Post);

I tried to do something like above line.But didnt work.

Thanks For Your Time

  • 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-04T10:14:45+00:00Added an answer on June 4, 2026 at 10:14 am

    I assume you’re using WCF Data Services 5.0 on the client (since you’re using the Execute with a method). Please upgrade to the RTM bits (http://blogs.msdn.com/b/astoriateam/archive/2012/04/09/wcf-data-services-5-0-rtm-release.aspx), which are also available on NuGet (search for Microsoft.Data.Services.Client). After that this code should work just fine:

    public bool Add(string x1, string x2, string x3)
    {
         return this.ctx.Execute<bool>(
             new Uri("Add", UriKind.Relative),
             "POST",
             /*singleResult*/ true,
             new UriOperationParameter("x1", x1),
             new UriOperationParameter("x2", x2),
             new UriOperationParameter("x3", x3))
             .Single();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to copy files to the rootDir using a task like the one
i'm trying to develop an interface like Windows Task Manager -> Performance Tab using
I'm trying to accomplish what should be a very simple task using the ListView
I'm trying to write an MSBuild task to build a database using FluentNhibernate mappings.
I'm trying to copy a directory using the Ant copy task. I am a
The task: I am trying to create a custom data type and have it
I'm trying to design a bulk data import task using Django's ORM ontop of
I am trying to implement a task using the cakephp shell for my application.
I'm trying to write a simple task using Maven: <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.3</version> <executions> <execution>
I am trying to do what I thought would be a trivial task using

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.