I have a LINQ query code using nHibernate, and when it is executed, it throws a PartialEvaluationExceptionExpression expression. What exactly does this mean, and what can I do about it?
SomeIqueryableNhibernateObject .Where(x=>... some expression && !Model.date.HasValue ? true : (x.fooDate.Date == Model.date.Value.Date) && some expresion
Where is the model:
public class Filter { DateTime? date; }
The exception is caused by the false path of the ternary operator:
x.fooDate.Date == Model.date.Value.Date
Even if I change it to:
x.fooDate != null && Model.date.HasValue && x.fooDate.Date == Model.date.Value.Date
it still throws an exception.
c # linq nhibernate
Landeeyo
source share