/// <summary> /// 异步更新信息 /// </summary> /// <param name="data">要更新的信息</param> /// <param name="condition">条件</param> /// <param name="ignoreFields">忽略的字段</param> /// <returns>受影响行数</returns> public Task <int> UpdateAsync(object data, Expression <Func <T, bool> > condition, string[] ignoreFields = null) { SqlQuery query = SqlQueryUtil.BuilderUpdateSqlQuery(data, condition, TableName, ignoreFields: ignoreFields, dbType: WriterDataType); return(GetDataAccess().ExecuteNonQueryAsync(query)); }
/// <summary> /// 更新信息 /// </summary> /// <param name="data">要更新的信息</param> /// <param name="condition">条件</param> /// <param name="ignoreFields">忽略的字段</param> /// <returns>受影响行数</returns> public int Update(object data, object condition, string[] ignoreFields = null) { SqlQuery query = SqlQueryUtil.BuilderUpdateSqlQuery(data, condition, TableName, ignoreFields: ignoreFields, dbType: WriterDataType); return(GetDataAccess().ExecuteNonQuery(query)); }