Entity Framework Model with inheritance and RIA Services

We have an entity framework model with has some inheritance in it.

The following example is not the actuall model, but just to make my point...

Let's say

Base class: Person Child classes: Employee, Customer

The database has been generated, the DomainService has been created and we can get to the data:

lstCustomers.ItemsSource = context.Persons;
EntityQuery<Person> query = context.GetPeopleQuery().Take(4);
context.Load(query);

But how can I modify the query to only return Customers ?

Answers


Have you already tried the following:

context.GetPeopleQuery().OfType<Customer>().Take(4)

I can imagine this doesn't have the required effect though, because the OfType is probably evaluated client-side..


Need Your Help

Block downloading by Content-Type via Chrome Extension

javascript google-chrome google-chrome-extension http-headers

I am developing an extension for blocking downloading by file's Content-Type. This is part of background script which handle headers receiving:

Converting .net 1.1 to .net 2.0

.net

how we can convert .net 1.1 to .net 2.0 without any change in code?