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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:22:05+00:00 2026-05-11T05:22:05+00:00

I am using ADO.Net Data Services and have a Service Operation that ends up

  • 0

I am using ADO.Net Data Services and have a Service Operation that ends up returning the results of some linq to entities statements. As a part of those Linq statements there is a .Include(‘NavProp’) to include a sub-object. When running this service operation it doesn’t appear to return that expanded Include. Does anyone know either why that is or how to fix that? Is it possible to add a keyword in the call to the service operation to expand that sub-object? (I tried $expand=subObject but that doesn’t seem to work – bad request).

I’d like to end up with either: 1.) syntax for a linq statement in a service operation that returns the .Include also (i’m pretty sure this isn’t possible)

something like: (from c in context.MyObj.Include('SubObj') select c).ToList() (this works inside the service operation, but doesn't provide the SubObj on the client side) 

or

2.) syntax for the service operation request to expand the subObject

something like: http://localhost/MyDataService/MyDataService.svc/ServiceOp1?param1=234$expand=SubObj (note: this doesn't work) 
  • 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. 2026-05-11T05:22:06+00:00Added an answer on May 11, 2026 at 5:22 am

    It looks like this is not possible at present (.net 3.5 SP1). Service Operations will only return either primative types or entities. Any other type including custom types or expanded entities cannot be returned from a service operation. To deal with this one must just return the item(s) from the service operation and then if an include/expand is needed on the client side one must call ‘LoadProperty’ for the desired object expansion (note: this means another database hit per LoadProperty call).

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

Sidebar

Related Questions

I have an ADO.NET Data Service and a regular WCF service. I'm using both
Our team is evaluating using WCF Data Services (formerly ADO.NET Data Services), and have
I am encountering a weird error when using linq-to-sql with ado.net data services. I
My application is a client/server solution using an ADO.NET Data Service. The Data Service
I am using Oracle 11.1.0.6.0 and ADO.NET (System.Data.OracleClient) to run a query that works
Just some background, sorry so long winded. I'm using the System.Data.SQLite ADO.net adapter to
Is it possible to POST to a service operation defined in an ADO.NET data
I'm using ASP.NET MVC4 (EF Code-first) with WCF ADO.NET Data Service October 2011 CTP.
I have an ADO.NET Data Service (we'll call it service.svc). When I deploy it
When using ADO.Net Data Services client to refresh an entity by calling the LoadProperty

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.