public override string ToSql(ExpressionConverter expressionRouter, params object[] skipParameters) { string condition = expressionRouter.ToCondition(this.Condition, skipParameters); if (this.selectField == null) { return(condition); } string fieldName = expressionRouter.ToFieldName(this.selectField); string viewOrTableName = DbObjectTools.GetViewOrTableName(typeof(T)); viewOrTableName = expressionRouter.SqlFormatter.FormatTableOrViewName(viewOrTableName); fieldName = expressionRouter.SqlFormatter.FormatFieldName(fieldName); if (this.methodFormat != null) { fieldName = string.Format(this.methodFormat, fieldName); } return(expressionRouter.SqlFormatter.FormatSelectSql(viewOrTableName, fieldName, condition)); }