/// <summary> /// 判断当前数据是否存在 /// </summary> /// <param name="parameters">参数</param> /// <param name="sqlName">sql语句</param> /// <returns></returns> public bool Exists(HashObject parameters, string sqlName) { using (DbHelperWrapper dbhelper = new DbHelperWrapper(this._dbrwType, this._dbName, this._tableName, sqlName, parameters)) { dbhelper.LogEnable = this.LogEnable; bool result = dbhelper.Exists(); return(result); } }
/// <summary> /// 判断当前数据是否存在 /// </summary> /// <param name="whereParameters">条件参数</param> /// <returns></returns> public bool Exists(HashObject whereParameters) { string sql = SchemaManager.GetExistsSQL(this._dbName, this._tableName, whereParameters); using (DbHelperWrapper dbhelper = new DbHelperWrapper(this._dbrwType, this._dbName, this._tableName, sql, whereParameters, SqlType.CmdText)) { dbhelper.LogEnable = this.LogEnable; bool result = dbhelper.Exists(); return(result); } }