0
我有以下情况:LINQ的NHibernate的 - 分隔查询
与
var totalRecords = (from entry in invalidAccEntryRepository
select entry);
if (CustomerAccountInfoFilterActive)
{
totalRecords.Where(entry =>
entry.CustomerAccountInfo.CustomerAccountName == CustomerAccountName &&
entry.CustomerAccountInfo.CustomerAccountId == CustomerAccountId);
}
totalRecordsCount = totalRecords.Count();
第一查询工作完全,但第二个查询仅执行的唯一
var totalRecords = (from entry in invalidAccEntryRepository
select entry);
并忽略有条件添加的表达式。
任何人都知道问题可能是什么?你需要更多信息吗?
Thx提前!
非常感谢! – Chris 2009-08-27 13:28:14
克里斯没问题。 :) – 2009-08-27 13:38:20