コード例 #1
0
        private void TestToInt64(WeekDay?x, Int64?expectedValue)
        {
            _Int64Enum <WeekDay> column1 = x;
            var expr   = (_Int64)column1;
            var dbExpr = (DbCastExpression)expr.DbExpression;

            dbExpr.Verify(column1, typeof(WeekDay?), typeof(Int64?));
            expr.VerifyEval(expectedValue);
        }
コード例 #2
0
        private void TestBitwiseAnd(Bits?x, Bits?y, Bits?expectedValue)
        {
            _Int64Enum <Bits> column1 = x;
            _Int64Enum <Bits> column2 = y;
            var expr   = column1 & column2;
            var dbExpr = (DbBinaryExpression)expr.DbExpression;

            dbExpr.Verify(BinaryExpressionKind.BitwiseAnd, column1, column2);
            expr.VerifyEval(expectedValue);
        }
コード例 #3
0
        private void TestNotEqual(WeekDay?x, WeekDay?y, bool?expectedValue)
        {
            _Int64Enum <WeekDay> column1 = x;
            _Int64Enum <WeekDay> column2 = y;
            var expr   = column1 != column2;
            var dbExpr = (DbBinaryExpression)expr.DbExpression;

            dbExpr.Verify(BinaryExpressionKind.NotEqual, column1, column2);
            expr.VerifyEval(expectedValue);
        }
コード例 #4
0
        private static void TestImplicit(WeekDay?x)
        {
            _Int64Enum <WeekDay> column = x;

            column.VerifyParam(x);
        }
コード例 #5
0
 /// <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 _Int64Enum <T> Param(T?x, _Int64Enum <T> sourceColumn = null)
 {
     return(new ParamExpression <T?>(x, sourceColumn).MakeColumn <_Int64Enum <T> >());
 }