sdk/dotnet/test/Datasync.Common.Test/Mocks/MockOfflineStore.cs
/// <summary>
/// Updates or inserts the item(s) provided in the table.
/// </summary>
/// <param name="tableName">The table to be used for the operation.</param>
/// <param name="items">The item(s) to be updated or inserted.</param>
/// <param name="ignoreMissingColumns">If <c>true</c>, extra properties on the item can be ignored.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe.</param>
/// <returns>A task that completes when the item has been updated or inserted into the table.</returns>
Updates or inserts the item(s) provided in the table.
Updates or inserts the item ( s ) provided in the table .
public Task UpsertAsync(string tableName, IEnumerable<JObject> items, bool ignoreMissingColumns, CancellationToken cancellationToken = default)
        {
            if (ExceptionToThrow != null)
            {
                throw ExceptionToThrow;
            }
            var table = GetOrCreateTable(tableName);
            foreach (JObject item in items)
            {
                var id = ServiceSerializer.GetId(item);
                table[id] = item;
            }
            return Task.CompletedTask;
        }
public Task UpsertAsync ( string tableName , IEnumerable < JObject > items , bool ignoreMissingColumns , CancellationToken cancellationToken = default ) { if ( ExceptionToThrow != null ) { throw ExceptionToThrow ; } var table = GetOrCreateTable ( tableName ) ; foreach ( JObject item in items ) { var id = ServiceSerializer . GetId ( item ) ; table [ id ] = item ; } return Task . CompletedTask ; }
Updates or inserts the item(s) provided in the table.
Updates or inserts the item ( s ) provided in the table .
A task that completes when the item has been updated or inserted into the table.
A task that completes when the item has been updated or inserted into the table .
tableName
string
The table to be used for the operation.
The table to be used for the operation .
items
IEnumerable<JObject>
The item(s) to be updated or inserted.
The item ( s ) to be updated or inserted .
ignoreMissingColumns
bool
None
cancellationToken
CancellationToken
A  to observe.
A to observe .