2015-06-25 11:58 GMT+01:00 PeSo <[email protected]>: > session.Query<T>().Where(somecondition).BitOrAggregate(x => x.Rights); > > I managed to implement the extension method (by studying nhibernates Min/max implementation):
Yes, in this case the runtime will simply call the BitOrAggregate() method, and as you've discovered that method should typically add something to the expression. I didn't read that carefully enough before. See also MS source for reference: https://github.com/Microsoft/referencesource/blob/master/System.Core/System/Linq/IQueryable.cs > > Now it ends up in the expression tree but gave another exception when > parsing the expression. > maybe the where filter is too complex, I think the expression itself is > correct and I am hitting some linq limitations. > Does it work without the where-condition? /Oskar -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
