private void TestToChar(WeekDay?x, Char?expectedValue) { _CharEnum <WeekDay> column1 = x; var expr = (_Char)column1; var dbExpr = (DbCastExpression)expr.DbExpression; dbExpr.Verify(column1, typeof(WeekDay?), typeof(Char?)); expr.VerifyEval(expectedValue); }
private void TestEqual(WeekDay?x, WeekDay?y, bool?expectedValue) { _CharEnum <WeekDay> column1 = x; _CharEnum <WeekDay> column2 = y; var expr = column1 == column2; var dbExpr = (DbBinaryExpression)expr.DbExpression; dbExpr.Verify(BinaryExpressionKind.Equal, column1, column2); expr.VerifyEval(expectedValue); }
private static void TestImplicit(WeekDay?x) { _CharEnum <WeekDay> 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 _CharEnum <T> Param(T?x, _CharEnum <T> sourceColumn = null) { return(new ParamExpression <T?>(x, sourceColumn).MakeColumn <_CharEnum <T> >()); }