public List GetLicensePlatesToExport()

in Hands-on lab/lab-files/src/TollBooth/TollBooth/DatabaseMethods.cs [32:52]


        public List<LicensePlateDataDocument> GetLicensePlatesToExport()
        {
            _log.LogInformation("Retrieving license plates to export");
            int exportedCount = 0;
            var collectionLink = UriFactory.CreateDocumentCollectionUri(_databaseId, _collectionId);
            List<LicensePlateDataDocument> licensePlates;

            using (_client = new DocumentClient(new Uri(_endpointUrl), _authorizationKey))
            {
                // MaxItemCount value tells the document query to retrieve 100 documents at a time until all are returned.
                // TODO 5: Retrieve a List of LicensePlateDataDocument objects from the collectionLink where the exported value is false.
                // COMPLETE: licensePlates = _client.CreateDocumentQuery ...
                
                // TODO 6: Remove the line below.
                licensePlates = new List<LicensePlateDataDocument>();
            }

            exportedCount = licensePlates.Count();
            _log.LogInformation($"{exportedCount} license plates found that are ready for export");
            return licensePlates;
        }