public async Task MarkLicensePlatesAsExported()

in Hands-on lab/lab-files/src/TollBooth/TollBooth/DatabaseMethods.cs [62:78]


        public async Task MarkLicensePlatesAsExported(IEnumerable<LicensePlateDataDocument> licensePlates)
        {
            _log.LogInformation("Updating license plate documents exported values to true");
            var collectionLink = UriFactory.CreateDocumentCollectionUri(_databaseId, _collectionId);

            using (_client = new DocumentClient(new Uri(_endpointUrl), _authorizationKey))
            {
                foreach (var licensePlate in licensePlates)
                {
                    licensePlate.exported = true;
                    var response = await _client.ReplaceDocumentAsync(UriFactory.CreateDocumentUri(_databaseId, _collectionId, licensePlate.Id), licensePlate);

                    var updated = response.Resource;
                    //_log.Info($"Exported value of updated document: {updated.GetPropertyValue<bool>("exported")}");
                }
            }
        }