sdk/dotnet/src/Microsoft.Datasync.Client.SQLiteStore/OfflineSQLiteStore.cs
/// <summary>
/// Deletes items from the table where the items are identified by their ID.
/// </summary>
/// <param name="tableName">The name of the table where the items are located.</param>
/// <param name="ids">A list of IDs to delete.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe.</param>
/// <returns>A task that completes when the items have been deleted from the table.</returns>
Deletes items from the table where the items are identified by their ID.
Deletes items from the table where the items are identified by their ID .
public override async Task DeleteAsync(string tableName, IEnumerable<string> ids, CancellationToken cancellationToken = default)
        {
            Arguments.IsValidTableName(tableName, true, nameof(tableName));
            Arguments.IsNotNull(ids, nameof(ids));
            await EnsureInitializedAsync(cancellationToken).ConfigureAwait(false);
            var parameters = ids.ToParameterList("id");
            if (parameters.Count == 0)
            {
                return; 
            }
            string sql = SqlStatements.DeleteIdsFromTable(tableName, SystemProperties.JsonIdProperty, parameters.Keys);
            using (operationLock.AcquireLock())
            {
                ExecuteNonQueryInternal(sql, parameters);
            }
        }
public override async Task DeleteAsync ( string tableName , IEnumerable < string > ids , CancellationToken cancellationToken = default ) { Arguments . IsValidTableName ( tableName , true , nameof ( tableName ) ) ; Arguments . IsNotNull ( ids , nameof ( ids ) ) ; await EnsureInitializedAsync ( cancellationToken ) . ConfigureAwait ( false ) ; var parameters = ids . ToParameterList ( " " ) ; if ( parameters . Count == 0 ) { return ; } string sql = SqlStatements . DeleteIdsFromTable ( tableName , SystemProperties . JsonIdProperty , parameters . Keys ) ; using ( operationLock . AcquireLock ( ) ) { ExecuteNonQueryInternal ( sql , parameters ) ; } }
Deletes items from the table where the items are identified by their ID.
Deletes items from the table where the items are identified by their ID .
// Don't execute a statement if there is nothing to execute.
A task that completes when the items have been deleted from the table.
A task that completes when the items have been deleted from the table .
tableName
string
The name of the table where the items are located.
The name of the table where the items are located .
ids
IEnumerable<string>
A list of IDs to delete.
A list of IDs to delete .
cancellationToken
CancellationToken
A  to observe.
A to observe .