Beispiel #1
0
        /// <summary>
        /// Add between expression to detached criteria
        /// </summary>
        public static DetachedCriteria AddBetween(this DetachedCriteria dc, string propertyName, object lo, object hi)
        {
            // return dc.Add(IsBetweenCriterion(propertyName, lo, hi));

            if (lo != null)
            {
                dc.AddGe(propertyName, lo);
            }
            if (hi != null)
            {
                dc.AddLe(propertyName, hi);
            }

            return(dc);
        }