SqlCustomTextExpression can be used to insert custom SQL text into the SQL generated by SqlGeneratingExpressionVisitor. The custom text is inserted into the statement as is, it is not escaped. Therefore, the provider making use of SqlCustomTextExpression has to make sure the custom text cannot lead to SQL injection attacks.
Inheritance: SqlCustomTextGeneratorExpressionBase
    public void VisitSqlCaseExpression_WithElse ()
    {
      var case1 = new SqlCaseExpression.CaseWhenPair (new SqlCustomTextExpression ("test1", typeof (bool)), new SqlCustomTextExpression ("value1", typeof (int)));
      var case2 = new SqlCaseExpression.CaseWhenPair (new SqlCustomTextExpression ("test2", typeof (bool)), new SqlCustomTextExpression ("value2", typeof (int)));
      var elseCase = new SqlCustomTextExpression ("elseValue", typeof (int));
      var expression = new SqlCaseExpression (typeof (int), new[] { case1, case2 }, elseCase);

      SqlGeneratingExpressionVisitor.GenerateSql (expression, _commandBuilder, _stageMock);

      Assert.That (_commandBuilder.GetCommandText (), Is.EqualTo ("CASE WHEN test1 THEN value1 WHEN test2 THEN value2 ELSE elseValue END"));
    }
 public void SetUp ()
 {
   _sqlCustomTextExpression = new SqlCustomTextExpression ("test", typeof (string));
 }