private void CopyCriteriaValues(CriteriaImpl criteria, IQueryOver <TRoot, TRoot> query)
 {
     if (!string.IsNullOrEmpty(criteria.CacheRegion))
     {
         query.CacheRegion(criteria.CacheRegion);
     }
     if (criteria.Cacheable)
     {
         query.Cacheable();
     }
     if (criteria.IsReadOnly)
     {
         query.ReadOnly();
     }
     foreach (var pair in criteria.LockModes)
     {
         query.UnderlyingCriteria.SetLockMode(pair.Key, pair.Value);
     }
     if (criteria.Timeout != RowSelection.NoValue)
     {
         query.UnderlyingCriteria.SetTimeout(criteria.Timeout);
     }
 }
 public IQueryOver <TRoot> CacheRegion(string cacheRegion)
 {
     MainQuery.CacheRegion(cacheRegion);
     return(this);
 }