public FileStreamResult GenerateGraph(int numberOfNodes) { var stream = _graphService.GenerateGraph(numberOfNodes); return(new FileStreamResult( stream, new MediaTypeHeaderValue("text/plain")) { FileDownloadName = "generatedGraph.json" }); }