/// <summary> /// 添加到Where子句 /// </summary> /// <param name="builder">Sql生成器</param> /// <param name="sql">Sql语句</param> /// <param name="condition">该值为true时添加Sql,否则忽略</param> public static ISqlBuilder AppendWhere(this ISqlBuilder builder, string sql, bool condition) { if (condition) { builder.AppendWhere(sql); } return(builder); }