C#,NHibernate在session.QueryOver中的多个条件

时间:2013-01-23 11:19:03

标签: c# linq where queryover

我正在使用多个where条件但返回的行数不正确如果我在最后2注释掉它返回的条件右边无法弄清楚如何添加多个Where

if (CustomFilter!= null)
       {
       int rowcount = session.QueryOver<clsCountryData>()
         .Select(Projections.Count(Projections.Id()))
         .Where(Restrictions.In("Countries",CustomFilter.SelectedCountriess))
         .Where(Restrictions.Eq("OrderType", CustomFilter.OrderType))
         .Where(Restrictions.Between("OrderTime", CustomFilter.OrderDateFrom , CustomFilter.OrderDateTo))
         .FutureValue<int>().Value;
       } 

0 个答案:

没有答案