Hd.QueryExtensions.WhereTerm.CreateBetween C# (CSharp) Method

CreateBetween() public static method

Creates a WhereTerm which checks weather a value is in a specifed range.
CreateBetween only accepts expressions which yeild a 'Date' or 'Number' values. All expressions must be of compatible types.
public static CreateBetween ( SqlExpression expr, SqlExpression lowBound, SqlExpression highBound ) : WhereTerm
expr SqlExpression Expression which yeilds the value to be checked
lowBound SqlExpression Expression which yeilds the low bound of the range
highBound SqlExpression Expression which yeilds the high bound of the range
return WhereTerm
		public static WhereTerm CreateBetween(SqlExpression expr, SqlExpression lowBound, SqlExpression highBound)
		{
			WhereTerm term = new WhereTerm();
			term.expr1 = expr;
			term.expr2 = lowBound;
			term.expr3 = highBound;

			term.type = WhereTermType.Between;

			return term;
		}