Entity Framework: Sort on Field of Derived Type
===

I'm pretty sure I can't do what I want to do in EF4.3, but before I abandon the attempt I thought I'd run it by some more experienced programmers.

I have a schema where two entity types, 'person' and 'org', each derive from a root entity I call 'named'. This structure allows me to associate an instance of 'named' with instances of another entity called 'address' via a many-to-many relationship, 'entity_address', without having to distinguish between whether the 'named' entity is an organization or a person.

When I query entity_address I'd like to be able to sort the results by different properties depending upon whether the entity_address instance is a 'person' or an 'org'. In the case of a person the "input" to the sorting algorithm might be the value of the property "last_name", while for an org it might be the property "org_name".

If I try the obvious:

    IQueryable<named> sorted = entities.OrderBy(x => ( x is person ) ? ( (person) x ).last_name : ( (org) x ).org_name);

when I access "sorted" EF throws an exception about only being able to cast primitive types. I presume it can't apply the cast operator to the "x" instance.

I've tried a lot of less obvious approaches, with no success :).

Is there a way to do this in LINQ to Entities? 

I know I can solve the problem by denormalizing the database and sticking a "sort_field" in the entity 'named', and then just sort on that (I'd have to include logic for keeping the sort_field value consistent with changes to values in instances of person and org, but that's certainly feasible).