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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:56:47+00:00 2026-06-18T07:56:47+00:00

As I mentioned in my last question , I reading through Alex D. James’

  • 0

As I mentioned in my last question, I reading through Alex D. James’ excellent three year old WCF Data Services Custom Provider blog. When I get to the section about related data we blindly describe all of our data as ResourceTypeKind.EntityType. I looked up the documentation, and there is no definition or guidance on using ResourceTypeKind.ComplexType.

I assume that it is a non-primitive type that is to always be included in my query, but cannot find anything that confirms that. This would be the model that is used for EF. I assume that is why this even exists.

If my assumption is correct, do I define my ComplexTypes in the same manner as I do my ResourceTypeKind.EntityTypes? Can I assume the same rules for WCF Data Services ComplexTypes as I do for EF ComplexTypes?

[Edit] What are the implications to querying across WCF Data Services a.k.a. OData? Am I expected to use .Expand(complex) a.k.a. $expand? In a client using LInQ and the WCF Data Service Client, should I be creating an anonymous type in order to fetch the complex type? Does the client know that they are ComplexType?

  • 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-18T07:56:48+00:00Added an answer on June 18, 2026 at 7:56 am

    Complex types in OData are very similar to complex types in EF. By OData they are treated as atomic “value” types. So the response always includes the entire value (even if it is nested, that is contains multiple complex types in a hierarchy and so on).

    As for query support, clients can address into the complex type only if they request a single value. (Assuming Address is a property on Customer which type is a complex type). So for example ~/Customers(1)/Address/City is a valid query and it returns just the City property of the Address complex value.

    Since the value is treated as atomic, $expand doesn’t work on it (it will fail, as it only works on navigation properties). $select does work, but only on the entire complex property as a whole. So I can do ~/Customers?$select=Address which would return me all the customers but with only the Address property. I can’t do ~/Customers?$select=Address/City – that is invalid.

    In a certain way you can view complex properties as “always expanded”, but it’s better to not think about them as entities/navigations, but as a separate thing.

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

Sidebar

Related Questions

As I mentioned in a question last week, I'm working with @coreyward 's excellent
I've asked very similar question before and should have mentioned more detailed. Last time
A question exactly like this was asked last year, but this question was for
Hi as I mentioned in last question that I am learning class and method
I previously asked a question about fetching the last 100 mentions for a person
I was wondering about the last constructor for std::string mentioned here . It says:
I wrongly worded my last question so I'm going to retry this. I am
I have been working on a web services related project for about the last
I'm refreshing my Spring knowledge, reading the reference documentation for spring 3.1. Last time
Following up from my last question does anyone know how I can use a

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.