public async Task AddCollectionAsync(ExecutionContext context) { var collection = await context.Gateway.AddCollectionAsync( context.Database, Name, PartitionKey, RequestUnits); await ConvergeTargetAsync(context.AddCollection(collection)); }
private async Task UpdatingCollectionsAsync( ExecutionContext context, IEnumerable <DocumentCollection> toUpdate) { foreach (var coll in toUpdate) { var target = (from t in Collections where t.Name == coll.Id select t).First(); Console.WriteLine($"Updating collection: {coll.Id}"); await target.ConvergeTargetAsync(context.AddCollection(coll)); } }