Exemplo n.º 1
0
        public void Process(DbMethodCallExpression exp, SqlGenerator generator)
        {
            List <WhenThenExpressionPair> pairs = new List <WhenThenExpressionPair>();

            GetWhenThenPairs(exp.Object as DbMethodCallExpression, pairs);

            pairs.Reverse();
            List <WhenThenExpressionPair> whenThenPairs = pairs;
            DbExpression         elseExp     = exp.Arguments[0];
            DbCaseWhenExpression caseWhenExp = new DbCaseWhenExpression(exp.Type, whenThenPairs, elseExp);

            caseWhenExp.Accept(generator);
        }
Exemplo n.º 2
0
 public override DbExpression Visit(DbCaseWhenExpression exp)
 {
     return(exp.Accept(this._generator));
 }