private void TestCastToString(Char?x, String expectedValue) { _Char column1 = x; _String expr = column1.CastToString(); var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(Char?), typeof(String)); expr.VerifyEval(expectedValue); }
private void TestFromChar(Char?x, WeekDay?expectedValue) { _Char column1 = x; var expr = (_CharEnum <WeekDay>)column1; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(Char?), typeof(WeekDay?)); expr.VerifyEval(expectedValue); }
private void TestFromString(String x, Char?expectedValue) { _String column1 = x; _Char expr = (_Char)column1; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(String), typeof(Char?)); expr.VerifyEval(expectedValue); }
private void TestLessThan(Char?x, Char?y, bool?expectedValue) { _Char column1 = x; _Char column2 = y; var expr = column1 < column2; var dbExpr = (DbBinaryExpression)expr.DbExpression; dbExpr.Verify(BinaryExpressionKind.LessThan, column1, column2); expr.VerifyEval(expectedValue); }
private void TestGreaterThanOrEqual(Char?x, Char?y, bool?expectedValue) { _Char column1 = x; _Char column2 = y; var expr = column1 >= column2; var dbExpr = (DbBinaryExpression)expr.DbExpression; dbExpr.Verify(BinaryExpressionKind.GreaterThanOrEqual, column1, column2); expr.VerifyEval(expectedValue); }
private static void TestConst(char?x) { _Char column = _Char.Const(x); column.VerifyConst(x); }
private void TestImplicit(Char?x) { _Char column = x; column.VerifyParam(x); }
private void TestParam(Char?x) { _Char column = _Char.Param(x); column.VerifyParam(x); }
/// <summary>Creates a column of parameter expression.</summary> /// <param name="x">The value of the parameter expression.</param> /// <param name="sourceColumn">The value which will be passed to <see cref="DbParamExpression.SourceColumn"/>.</param> /// <returns>The column of parameter expression.</returns> public static _Char Param(Char?x, _Char sourceColumn = null) { return(new ParamExpression <Char?>(x, sourceColumn).MakeColumn <_Char>()); }