Using a conditional expression for an entity projector when querying for a base class

Apr 11, 2010 at 9:39 PM

Scenario:

I have an abstract entity which has a number of concrete implementations in a Table-per-Class mapping pattern. In order to create concrete entities when querying for the base class, I've needed to create a ConditionalExpression in an InvokeExpression/LambdaExpression to generate the entity.

Solution:

I've needed to make a few changes to the IQToolkit to allow query binding to arguments and parameters vs. member binding expressions, as well as needing to add new support on the QueryLanguage to determine if the underlying database allows the parameterization of literals in a conditional expression (e.g.: SQL CE doesn't allow 'CASE ID1 NOT NULL THEN @p0' whereas SQL Server allows this).

I'm used to submitting a patch in a case like this, but I note that the source code isn't kept in a CodePlex repository, and therefore wonder how useful such a patch would be. If anyone would like it, I'll post it.