1

我正在使用多个 where 条件,但如果我注释掉它返回的最后 2 个 where 条件,则返回的行数不正确,无法弄清楚如何添加多个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;
       } 
4

0 回答 0