public virtual Expression VisitOrderBy(OrderByExpression node) { Visit(node.Source); if (node.FieldName is ConstantExpression) { _orderByXml.Add(string.Format("<FieldRef Name='{0}'{1} />", ((ConstantExpression)node.FieldName).Value.ToString(), node.OrderType == OrderByType.Descending ? "Ascending='FALSE'" : string.Empty)); return(node); } throw new NotSupportedException(); }
public virtual Expression VisitOrderBy(OrderByExpression node) { Visit(node.Source); if (node.FieldName is ConstantExpression) { _orderByXml.Add(string.Format("<FieldRef Name='{0}'{1} />", ((ConstantExpression)node.FieldName).Value.ToString(), node.OrderType == OrderByType.Descending ? "Ascending='FALSE'" : string.Empty)); return node; } throw new NotSupportedException(); }