Note that there are some explanatory texts on larger screens.

plurals
  1. POExposing derived types via data service for OData queries
    primarykey
    data
    text
    <p>I have created an EF4 CTP5 based code first model that includes two entities in a parent-child relationship where the child entity contains several extra fields. Both types are derived from the same table TPH and use a newly created discriminator. Now, I need to figure out how to expose the child entityset via the data service and make it available for querying.</p> <p>The use-case for this is that we have a table that contains a hierarchy of clients. Each client has a parent and zero or more children. A parent contains just the information needed to set-up the client and for billing (name, address, etc.). The children (you can think of them as sattelite branches) contain an additional set of properties that are unique to them in addition to what they inherit from the parent. All are contained in the same table that has been denormalized for pure search performance.</p> <p>So far, I have exposed the entity set in the manner suggested <a href="http://social.msdn.microsoft.com/Forums/en-GB/adodotnetdataservices/thread/eeb8f9c8-5888-49aa-9364-6bf84a48e30f" rel="nofollow">in this blog post</a> It suggests exposing a method that returns the context.Child IQueryable collection. However, this entity set is way too large (700k+ records) to just expose the entire thing and I cannot seem to get standard oData queries to work against the service operation.</p> <p>My questions are numerous but to keep this post as concise as possible I will limit them.</p> <p>•First, I want to know if this is still the best and only way to handle this? It seems like not allowing derived types to be exposed without this workaround is a major gap in functionality. •Second, how can I query this entityset? Is this possible? Is it possible I do not have something materialized properly in the EF piece? Any and all help or suggestions are greatly appreciated.</p> <p>Best and thanks in advance!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload