Exemple #1
0
        public async Task ImportElectionResultsData(ElectionSummary electionSummary)
        {
            try
            {
                if (electionSummary != null)
                {
                    var table = await GetElectionSummaryTable();

                    var operation = TableOperation.InsertOrReplace(electionSummary.ToElectionSummaryEntity());
                    await table.ExecuteAsync(operation);
                }
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Failed to import tracking data.");
                throw;
            }
        }
Exemple #2
0
        public void ToElectionSummaryEntity_ReturnsNull()
        {
            ElectionSummary summary = null;

            Assert.IsNull(summary.ToElectionSummaryEntity());
        }