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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 128k
  • Answers 128k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You could do it this way. Hope this helps #define… May 12, 2026 at 5:42 am
  • Editorial Team
    Editorial Team added an answer I think I know what your problem is, it's something… May 12, 2026 at 5:42 am
  • Editorial Team
    Editorial Team added an answer See this post from Scott Hanselman: ASP.NET Wire Format for… May 12, 2026 at 5:42 am

Related Questions

In another posting: Does Linq-To-Sql support composable queries there was discussion on how to
I am considering using ADO.Net Data Services in a project for the purpose of
I am encountering a weird error when using linq-to-sql with ado.net data services. I
I am currently doing a CRUD project for school and basically they want us

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.