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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:17:44+00:00 2026-05-31T00:17:44+00:00

I am implementing WCF Data Services using a DbContext and POCO entities. I am

  • 0

I am implementing WCF Data Services using a DbContext and POCO entities.

I am currently exposing two entities, SalesOrder and Customer.

SalesOrder has a property called Customer, which I should be able to retrive using this query:
http://localhost:902/ShopDataService.svc/SalesOrders()?$expand=Customer

However, no Customer object is returned. This is the XML block for each entry (of SalesOrder) that is returned…

<entry>
<id>http://localhost:902/ShopDataService.svc/SalesOrders(60)</id>
<title type="text"></title>
<updated>2011-03-17T14:58:11Z</updated>
<author>
  <name />
</author>
<link rel="edit" title="SalesOrder" href="SalesOrders(60)" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ShippingAddress" type="application/atom+xml;type=entry" title="ShippingAddress" href="SalesOrders(60)/ShippingAddress" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/InvoiceAddress" type="application/atom+xml;type=entry" title="InvoiceAddress" href="SalesOrders(60)/InvoiceAddress" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Customer" type="application/atom+xml;type=entry" title="Customer" href="SalesOrders(60)/Customer">
  <m:inline />
</link>
<category term="CarterShop.Commerce.Entities.SalesOrder" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<content type="application/xml">
  <m:properties>
    <d:Id m:type="Edm.Int32">60</d:Id>
    <d:Created m:type="Edm.DateTime">2011-03-12T15:23:47.07</d:Created>
    <d:ItemCost m:type="Edm.Decimal">8.00</d:ItemCost>
    <d:ShippingCost m:type="Edm.Decimal">0.00</d:ShippingCost>
    <d:ShippingVat m:type="Edm.Decimal">0.00</d:ShippingVat>
    <d:ItemVat m:type="Edm.Decimal">1.60</d:ItemVat>
    <d:Total m:type="Edm.Decimal">9.60</d:Total>
    <d:ShippingAddressId m:type="Edm.Int32" m:null="true" />
    <d:InvoiceAddressId m:type="Edm.Int32" m:null="true" />
    <d:Paid m:type="Edm.DateTime" m:null="true" />
    <d:Shipped m:type="Edm.DateTime" m:null="true" />
    <d:TransactionId m:null="true" />
    <d:OrderNumber>000068</d:OrderNumber>
    <d:SalesOrderStageId m:type="Edm.Int32">2</d:SalesOrderStageId>
    <d:CustomerId m:type="Edm.Int32">2</d:CustomerId>
    <d:CancellationReasonId m:type="Edm.Int32" m:null="true" />
    <d:ShippingBracketId m:type="Edm.Int32" m:null="true" />
  </m:properties>
</content>

You can tell it is trying to return the Customer object, because it is sending that element, as if it has no properties, but it is configured exactly the same as the SalesOrder entity.

Has anyone hit this issue before?
Edit:
I am exposing the data like this (so no permissions problems).

config.SetEntitySetAccessRule("SalesOrders", EntitySetRights.All);
config.SetEntitySetAccessRule("Customers", EntitySetRights.All);
config.SetEntitySetAccessRule("Addresses", EntitySetRights.All);
  • 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-31T00:17:45+00:00Added an answer on May 31, 2026 at 12:17 am

    This is not properly supported in Data Services. As usual – when you need something apart from Hello-World, you must write proper applications, rather than try to use ‘magic’ solutions such as Data Services.

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

Sidebar

Related Questions

I'm implementing several custom Data Service Providers in WCF Data Services : IDataServiceMetadataProvider IDataServiceQueryProvider
I am exploring the idea of implementing a web service api using WCF Data
In my solution there's a few WCF services, each of them implementing it's own
I am wanting to write some web services using WCF. I would like to
I'm connecting a WCF client to a group of services all implementing the same
we have a C#-Server which runs a WCF-Service. Currently we're implementing some (DataContract)-classes. Now
I am implementing wcf service using the config-less available with WebScriptServiceHostFactory in dotNet 4.
The application I am developing is exposing service metadata for a WCF service implementing
I'm currently implementing a service that uses WCF discovery and provides Discovery Endpoint and
I am writing a service using wcf. I have created a solution with two

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.