public string Updatet <T>(T t) where T : BaseEntity
        {
            StringBuilder sb = new StringBuilder();

            PropertyInfo[] propertiesArr = t.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);
            sb.AppendFormat("update {0}{1}{2} set ", ColumnBeginChar, t.__TableName, ColumnEndChar);
            int i = 0;

            foreach (PropertyInfo pi in propertiesArr)
            {
                SqlParamModel spm = new SqlParamModel()
                {
                    Type  = pi.PropertyType,
                    Value = pi.GetValue(t, null)
                };
                paramValsDic.Add(ParamPrefix + pi.Name, spm);
                i++;
                if (t.__IdentityKeys.Contains(pi.Name))
                {
                    continue;
                }
                if (i != propertiesArr.Length)
                {
                    sb.AppendFormat("{0}{1}{2}={3}{1},", ColumnBeginChar, pi.Name, ColumnEndChar, ParamPrefix, pi.Name);
                }
                else
                {
                    sb.AppendFormat("{0}{1}{2}={3}{1} ", ColumnBeginChar, pi.Name, ColumnEndChar, ParamPrefix, pi.Name);
                }
            }
            sb.Append(" where ");
            i = 0;
            foreach (string primary in t.__PrimaryKeys)
            {
                // paramValsDic[primary].BuildValueFormat()
                i++;
                if (i != t.__PrimaryKeys.Count)
                {
                    sb.AppendFormat("{1}{0}{2}={3}{0} and ", primary, ColumnBeginChar, ColumnEndChar, ParamPrefix);
                }
                else
                {
                    sb.AppendFormat("{1}{0}{2}={3}{0} ", primary, ColumnBeginChar, ColumnEndChar, ParamPrefix);
                }
            }
            if (i == 0)
            {
                throw new ArgumentException("未设置主键不能使用此更新方式!");
            }

            return(sb.ToString());
        }
        public string CreateUpdateSql(T t)
        {
            StringBuilder sb = new StringBuilder();

            PropertyInfo[] propertiesArr = t.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);
            sb.AppendFormat("update {0}{1}{2} set ", ColumnBeginChar, t.__TableName, ColumnEndChar);
            int i = 0;

            foreach (PropertyInfo pi in propertiesArr)
            {
                i++;
                if (t.__IdentityKeys.Contains(pi.Name))
                {
                    continue;
                }
                if (i != propertiesArr.Length)
                {
                    sb.AppendFormat("{0}{1}{2}={3}{1},", ColumnBeginChar, pi.Name, ColumnEndChar, ParamPrefix, pi.Name);
                }
                else
                {
                    sb.AppendFormat("{0}{1}{2}={3}{1} ", ColumnBeginChar, pi.Name, ColumnEndChar, ParamPrefix, pi.Name);
                }
                SqlParamModel spm = new SqlParamModel()
                {
                    Type  = pi.GetType(),
                    Value = pi.GetValue(t, null)
                };
                paramValsDic.Add(ParamPrefix + pi.Name, spm);
            }
            sb.Append(" where ");
            i = 0;
            foreach (string primary in t.__PrimaryKeys)
            {
                i++;
                if (i != t.__PrimaryKeys.Count)
                {
                    sb.AppendFormat("{2}{0}{3}={1} and ", primary, paramValsDic[primary].BuildValueFormat(), ColumnBeginChar, ColumnEndChar);
                }
                else
                {
                    sb.AppendFormat("{2}{0}{3}={1} ", primary, paramValsDic[primary].BuildValueFormat(), ColumnBeginChar, ColumnEndChar);
                }
            }

            return(sb.ToString());
        }