In some cases (I don't know how to influce it), the EntityFramework generates an expression tree containing ApplyExpressions instead of a JoinExpression. Other than the MS SQL Server (since version 2005) Firebird Server has no support for OUTER APPLY or CROSS APPLY statements.
Nevertheless, (I think) it is possible to handle those ApplyExpressions. In principle, the CROSS APPLY is a kind of a regular CROSS JOIN with some special scope features. For example in select e1.EmployeeId,e2.EmployeeId from Employee as e1 cross apply (select * from Employee e3 where e3.ReportsTo=e1.EmployeeId) as e2; you can use columns of "e1" in the sub-select - what is not possible with a CROSS JOIN. Though, the expression above can be transformed to an equal expression without an APPLY: select e1.EmployeeId,e2.EmployeeId from Employee as e1 cross join (select * from Employee e3) as e2 on e2.ReportsTo=e1.EmployeeId; The "cross apply" is replaced by "cross join". The WHERE-expression of the sub-select is used as the ON-condition. And - the sticking point - the "e3" scoped columns inside the where statement have to be scoped to "e2". Is it possible that the Firebird EF SqlGenerator will handle ApplyExpressions this way? Best regards ;-Daniel
------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider