private LastDataUpdateDetailsModel HandleGetLastDataUpdateDetails(HistoricalPdfStats currentPdfData) { _logger.LogInformation($"Hanling {nameof(GetLastDataUpdateDetails)}"); var result = new LastDataUpdateDetailsModel(); result.DataLastUpdatedOn = currentPdfData?.LasUpdatedOn ?? 0; result.DataLastUpdatedOnString = currentPdfData?.LasUpdatedOnString; return(result); }
private LastDataUpdateDetailsModel HandleGetLastDataUpdateDetails(HistoricalPdfStats data) { _logger.LogInformation($"Hanling {nameof(GetLastDataUpdateDetails)}"); var result = new LastDataUpdateDetailsModel(); var updateDetails = GetLastUpdatedDates(data, ""); result.DataLastUpdatedOn = updateDetails.lastUpdatedOn; result.DataLastUpdatedOnString = updateDetails.lastUpdatedOnString; result.Charts = data?.Charts? .Select(x => new { key = x.Key, value = MapToChartDataDetailsModel(x.Value) }) .ToDictionary(x => x.key, y => y.value) ?? new Dictionary <string, ChartDataDetailsModel>(); return(result); }