I have the following a priori simple request in the RavenDb repository:
return _session
.Query<StockKeepingUnit>()
.Where(x => x.QuantityInStock < x.OrderLevel)
.ToList()
.GroupBy(x => x.BrandName);
To which RavenDb the exception is thrown in the Where clause: Could not understand expression: .Where(x => (x.QuantityInStock < x.OrderLevel))
I understand that the problem is that I cannot request a comparison of properties in the same object and call it .ToList()before it "bypasses" the problem, but it is extremely inefficient.
What would be the correct way to fulfill this request?
source
share