I am using linq-to-nhibernate with the following query:
ISession session = GetSession();
var query = from storeZoneStyles in session.Linq<StoreZoneStyle>()
from storeZones in session.Linq<StoreZone>()
where storeZoneStyles.StoreZoneId == storeZones.StoreZoneId && storeZones.StoreCode == storeCode
select storeZoneStyles;
With this query, I only want to get all storeZoneStyles that belong to a storecode. Now when I run this I get the following run-time exception:
Unable to cast object of type 'System.Linq.Expressions.ConstantExpression' to type 'System.Linq.Expressions.LambdaExpression'.
Can somebody help me out please?