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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:44:10+00:00 2026-06-01T19:44:10+00:00

I checked the code example at http://msdn.microsoft.com/en-us/library/dd728281.aspx#Y0 , and found one interesting thing: if

  • 0

I checked the code example at http://msdn.microsoft.com/en-us/library/dd728281.aspx#Y0, and found one interesting thing: if we remove Public ReadOnly Property Items() from OrderItemData class, the service shows an error. Even if we don’t try to access Items, and only working with Orders.
Can somebody explain why this property is needed?

EDIT: To clarify: the property isn’t used directly. I removed it from the code, it compiles successfully, but service returns Request error: “The server encountered an error processing the request. See server logs for more details.” And there is no exception thrown.

I think that the service for some reason might need IQueryable(Of Item) property. Even if the property returns Nothing, the service starts working again:

Public ReadOnly Property Items() As IQueryable(Of Item) 
    Get 
        Return Nothing 
    End Get 
End Property
  • 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-01T19:44:11+00:00Added an answer on June 1, 2026 at 7:44 pm

    When WCF Data Service uses reflection provider (which is what the sample does), each entity type has to fulfill these conditions:

    • It has to be a public class with some public properties
    • It has to define key properties (either through convention or through the DataServiceKey attribute)
    • There must be a public property of type IQueryable where T is the entity type on the context class.

    If you remove the Items property you violate the rule number 3 above. As such the type Item is not recognized as an entity type anymore (it is internally treated as a complex type), but then it’s used on the Order class as an item type for a collection. That means it would have to be a navigation property, but that requires the item type to be an entity.

    If you’re looking for some kind of containment (where the Items are only accessible through the Order they belong to), the WCF DS current doesn’t support this yet.

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

Sidebar

Related Questions

I am using this code sample from here.. http://msdn.microsoft.com/en-us/data/gg685489 [HttpPost] public ActionResult Edit(int id,
I'm referring to this example http://emberjs.com/examples/todos/ In the code they clear the list by
I have the following code: f=open('data.txt', 'w') conn = urllib2.urlopen('http://example.com') page_html = conn.read() data=BeautifulSoup(page_html)
I would appreciate your help in understanding a "Concurrency Example" from: http://forums.sun.com/thread.jspa?threadID=735386 public synchronized
In other words, does it matter whether I use http://www.example.com/ or http://wwW.exAmPLe.COm/ ? I've
I checked out the example given on http://naghsheh.info/Pivot/Pivot.htm and tried to get it work
I used the code straight from the examples on yepnope's homepage: yepnope([{ load: 'http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js',
What's the easiest way to convert these requests: http://www.example.com/en/ http://www.example.com/en/index.php To: http://www.example.com/index.php?language_id=en There's various
I am using code from this site: http://www.spacesimulator.net/tut4_3dsloader.html It works in their example project
Why does the following code not work? Example: http://jsfiddle.net/ZZe5X/18/ $('.submit').submit(function () { e.preventDefault() if

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.