public async Task <IActionResult> ApplicationDownloadCsv(ApplicationDownloadViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View("~/Views/Roatp/ApplicationDownload.cshtml"));
            }

            var applications = await _applyApiClient.GetApplicationOversightDetailsForDownload(viewModel.FromDate.Value, viewModel.ToDate.Value);

            var exportModel = Mapper.Map <List <RoatpOversightOutcomeExportViewModel> >(applications);

            var bytearray = _csvExportService
                            .WriteCsvToByteArray <RoatpOversightOutcomeExportViewModel, RoatpOversightOutcomeExportCsvMap>(exportModel);

            var fileName = $"outcomes_{viewModel.FromDate:ddMMyy}_to_{viewModel.ToDate.Value:ddMMyy}.csv";

            return(File(bytearray, "text/csv", fileName));
        }