public async Task <FileStreamResult> GetReport([FromQuery] DateTimeOffset date, [FromQuery] ExportFormatOption format = ExportFormatOption.Txt) { var exportFileModel = await _service.BuildReport(date, format); return(File(exportFileModel.Stream, "application/octet-stream", exportFileModel.FileName)); }