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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:35:53+00:00 2026-05-27T22:35:53+00:00

I use a Service Operation in WCF data service to get a object. [WebGet]

  • 0

I use a Service Operation in WCF data service to get a object.

[WebGet]
    public IQueryable<sample> GetSamples(int Id)

I can retrieve data by

http://localhost:xx/GetSamples?Id=9

Is it possible to get property of the returned object similar to

http://localhost:xx/samples(x)/property

I’ve tried http://localhost:xx/GetSamples?Id=9/property, and http://localhost:xx/GetSamples/property?Id=9 etc. Nothing works.

  • 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-27T22:35:53+00:00Added an answer on May 27, 2026 at 10:35 pm

    If Sample is a complex type then this won’t work.
    If Sample is an entity type, then it will work with a small modification. Property access is only possible on a singleton result. WCF DS doesn’t know that your service operation always returns a single entity, to tell is to, add an attribute SingleResult to your service operation method. Then the first URL should work: service/GetSample/PropertyName?id=2
    If the Sample is an entity type and you know the key property value (or values) then service/Samples(keypropertyvalue)/PropertyName should also work.

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

Sidebar

Related Questions

I have a WCF service and use Spring.ServiceModel.Activation.ServiceHostFactory as a factory in my *.svc.
We are currently working on an application that will use a WCF service. The
Is it possible to POST to a service operation defined in an ADO.NET data
I'm working on a WCF Service. I have one service operation Function getValues(Optional verbose
I want to use the <operation>Asnyc methods rather than the Begin<operation>/End<operation> on my WCF
I want to use wcf performance counters per operation , like here: http://msdn.microsoft.com/en-us/library/ms731052(v=vs.90).aspx how
I'm trying to understand how to use WCF Data Services (based on EF 4.1)
I have an Operation Contract in my WCF service which returns an instance of
My question is about how you handle paging with a WCF data service. The
I want to build a WCF data service which should be used for CRUD

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.