Exemple #1
0
        public static void WriteLog(int no, string fileName, string desc, string expression, SqlLamBase sql)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("序号: [{0}]", no).AppendLine();
            sb.AppendFormat("描述: [{0}]", string.IsNullOrEmpty(desc) ? "无" : desc).AppendLine();
            sb.AppendFormat("表达式: {0}", string.IsNullOrEmpty(expression) ? "无" : expression).AppendLine();
            sb.AppendFormat("SQL: {0}", sql.GetSql()).AppendLine();
            var parameters = sql.GetParameters();

            if (parameters != null)
            {
                foreach (var item in parameters)
                {
                    sb.AppendFormat("参数: Key: [{0}], Value: [{1}]", item.Key, item.Value).AppendLine();
                }
            }
            else
            {
                sb.AppendFormat("参数: [无]").AppendLine();
            }
            LogHelper.WriteLog(fileName, sb.ToString());
        }
Exemple #2
0
 public SqlLam <T> WhereIsIn(Expression <Func <T, object> > expression, SqlLamBase sqlQuery)
 {
     _builder.And();
     _resolver.QueryByIsIn(expression, sqlQuery);
     return(this);
 }
Exemple #3
0
 public SqlLamBase()
 {
     SqlLamBase.SetAdapter(_adapter);
 }