public async Task <IEnumerable <string> > GetJsonData(KycReportType reportType, bool isDescending = false, IEnumerable <string> rowKeys = null)
        {
            string partitionKey;

            switch (reportType)
            {
            case KycReportType.KycReportDailyLeadership:
                partitionKey = ReportRowEntity.GeneratePartitionKey(KycReportType.KycReportDailyLeadership);
                break;

            default:
                partitionKey = null;
                break;
            }


            if (!string.IsNullOrWhiteSpace(partitionKey))
            {
                IEnumerable <ReportRowEntity> data;
                if (rowKeys == null)
                {
                    data = await _tableStorage.GetDataAsync(partitionKey);
                }
                else
                {
                    data = await _tableStorage.GetDataAsync(partitionKey, rowKeys);
                }

                var jsonRows = isDescending
                    ? data.OrderByDescending(d => d.Timestamp).Select(d => d.JsonRow)
                    : data.Select(d => d.JsonRow);

                //var jsonReport = $"[\r\n{string.Join(", \r\n", jsonRows)}\r\n]";

                return(jsonRows);
            }

            return(new List <string>());
        }
 public async Task InsertRow(IKycReportDailyLeadership row)
 {
     var reportDataRow = ReportRowEntity.Create(KycReportType.KycReportDailyLeadership, row, row.ReportDay.Ticks.ToString());
     await _tableStorage.InsertOrReplaceAsync(reportDataRow);
 }