Skip to content

Commit

Permalink
Finished the ExportLicensePlates function
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecruz91 committed Mar 1, 2018
1 parent de8473e commit 9c484ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions TollBooth/DatabaseMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ public List<LicensePlateDataDocument> GetLicensePlatesToExport()

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>();
// 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.
licensePlates = _client
.CreateDocumentQuery<LicensePlateDataDocument>(collectionLink, new FeedOptions {MaxItemCount = 100})
.Where(l => l.exported == false)
.ToList();
}

exportedCount = licensePlates.Count();
Expand Down
2 changes: 1 addition & 1 deletion TollBooth/FileMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public async Task<bool> GenerateAndSaveCsv(IEnumerable<LicensePlateDataDocument>
// Upload blob.
stream.Position = 0;
// TODO 7: Asyncronously upload the blob from the memory stream.
// COMPLETE: await blob...;
await blob.UploadFromStreamAsync(stream);

successful = true;
}
Expand Down

0 comments on commit 9c484ab

Please sign in to comment.