我正在使用带有以下查询的 linq-to-nhibernate:
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;
使用此查询,我只想获取属于 storecode 的所有 storeZoneStyles。现在,当我运行它时,我得到以下运行时异常:
无法将“System.Linq.Expressions.ConstantExpression”类型的对象转换为“System.Linq.Expressions.LambdaExpression”类型。
有人可以帮帮我吗?