nhibernate - IronPython with Linq throwing ArgumentTypeException -
I'm trying to extend my webapp with IronPython, which is working brilliantly so far, But I do not think it plays well with my NHibernateLinq setup.
I use a IQueryable & lt; Case & gt; I'm making available for IronPython code, and then I'm using Linq methods to filter it (Object, Function [Object, Bull] (throw)) < P> This works fine, but because I'm using ENFONAL instead of queries , it's pulling back all records from the database, where Before work on them, when I asked in the SQL query generated by NHibernate Ha should be.
So I tried:
Where qualified. Where [object] (data, function [object, bool] (func))
but it only yields:
Microsoft.Scripting.ArgumentTypeException: expected IQueryable [Object], query [Cas E]
Am I missing something? Is this also possible?
Anthony
Generic invariance causes you problems, basically. Func & lt; Object, Boyle & gt;
a Func & lt; Hair, bull & gt;
- At least until it is not variable for .NET 4.0
, notice that where qualified
will require an expression tree, the representative No. Does IronPathon Support Expression Trees?
If you can produce an expression tree in Python, then you expression
& lt; & Lt; Object, bool & gt; & Gt; ? If you can, then it should work.
Comments
Post a Comment