private void TestFromBoolean(_Boolean x, Int16?expectedValue) { _Int16 expr = (_Int16)x; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(x, typeof(bool?), typeof(Int16?)); expr.VerifyEval(expectedValue); }
private void TestFromString(String x, Int16?expectedValue) { _String column1 = x; _Int16 expr = (_Int16)column1; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(String), typeof(Int16?)); expr.VerifyEval(expectedValue); }
private void TestFromDouble(Double?x, Int16?expectedValue) { _Double column1 = x; _Int16 expr = (_Int16)column1; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(Double?), typeof(Int16?)); expr.VerifyEval(expectedValue); }
private void TestFromByte(byte?x, Int16?expectedValue) { _Byte column1 = x; _Int16 expr = column1; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(byte?), typeof(Int16?)); expr.VerifyEval(expectedValue); }
private void TestFromInt16(Int16?x, WeekDay?expectedValue) { _Int16 column1 = x; var expr = (_Int16Enum <WeekDay>)column1; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(Int16?), typeof(WeekDay?)); expr.VerifyEval(expectedValue); }
private void TestNotEqual(Int16?x, Int16?y, bool?expectedValue) { _Int16 column1 = x; _Int16 column2 = y; var expr = column1 != column2; var dbExpr = (DbBinaryExpression)expr.DbExpression; dbExpr.Verify(BinaryExpressionKind.NotEqual, column1, column2); expr.VerifyEval(expectedValue); }
private void TestGreaterThan(Int16?x, Int16?y, bool?expectedValue) { _Int16 column1 = x; _Int16 column2 = y; var expr = column1 > column2; var dbExpr = (DbBinaryExpression)expr.DbExpression; dbExpr.Verify(BinaryExpressionKind.GreaterThan, column1, column2); expr.VerifyEval(expectedValue); }
private void TestConst(Int16?x) { _Int16 column = _Int16.Const(x); column.VerifyConst(x); }
private void TestImplicit(Int16?x) { _Int16 column = 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 _Int16 Param(Int16?x, _Int16 sourceColumn = null) { return(new ParamExpression <Int16?>(x, sourceColumn).MakeColumn <_Int16>()); }