Exemple #1
0
        public override string ToString()
        {
            System.Text.StringBuilder sb = new StringBuilder();
            sb.Append("\tTotalCount:");
            sb.Append(this.totalCount);
            sb.Append(Environment.NewLine);

            if (this.NamedQuery == null && this.CustomSQL == null && this.QueryObject == null)
            {
                Type t = this.GetMappingType();
                this.QueryObject = MappingInfo.GetMappingInfo(t).Table;
            }
            sb.Append(this.NamedQuery ?? (this.ToSQLString() + this.ToOrderBy()));
            IEnumerator <KeyValuePair <string, object> > enumer = this.Parameters.GetEnumerator();

            while (enumer.MoveNext())//输出参数值
            {
                sb.Append(Environment.NewLine).Append("\t").Append(StatementParser.PREFIX)
                .Append(enumer.Current.Key).Append("=").Append(enumer.Current.Value);
            }

            return(sb.ToString());
        }