public override ExpressionElement Convert(IExpressionConverter converter, MethodCallExpression method) { var v = new VText(); var overMethod = method; v.Add(overMethod.Method.Name.ToUpper() + "("); v.AddRange(1, overMethod.Arguments.Skip(1). Where(e => !(e is ConstantExpression)). //Skip null. Select(e => converter.Convert(e)).ToArray()); return v.ConcatToBack(")"); }
public override ExpressionElement Convert(IExpressionConverter converter, MethodCallExpression method) { var arg = method.Arguments[method.SkipMethodChain(0)]; var array = arg as NewArrayExpression; var orderBy = new VText(); orderBy.Add("ORDER BY"); var sort = new VText() { Separator = "," }; sort.AddRange(1, array.Expressions.Select(e => converter.Convert(e)).ToList()); orderBy.Add(sort); return orderBy; }