public FileStreamResult SpecRequestList() { using (SpecRequestRepository sRepo = new SpecRequestRepository()) { var theData = sRepo.GetExportList(); return(new FileStreamResult(WriteCsvToMemory(theData), "text/csv") { FileDownloadName = "specrequests.csv" }); } }