protected async Task UpsertTestEntities <T>(List <T> entitiesToCreate, TableUpdateMode updateMode) where T : class, ITableEntity, new() { foreach (var entity in entitiesToCreate) { await CosmosThrottleWrapper(async() => await client.UpsertEntityAsync(entity, updateMode).ConfigureAwait(false)); } }
public virtual void UpdateEntity <T>(T entity, ETag ifMatch, TableUpdateMode mode = TableUpdateMode.Merge) where T : class, ITableEntity, new() { _batchOperations.AddUpdateEntityRequest( _changeset, _table, entity.PartitionKey, entity.RowKey, null, null, ifMatch.ToString(), tableEntityProperties: entity.ToOdataAnnotatedDictionary(), queryOptions: new QueryOptions() { Format = _format }); }
protected async Task UpsertTestEntities(List <Dictionary <string, object> > entitiesToCreate, TableUpdateMode updateMode) { foreach (var entity in entitiesToCreate) { await CosmosThrottleWrapper(async() => await client.UpsertEntityAsync(entity, updateMode).ConfigureAwait(false)); } }