public async Task <IActionResult> Demo(Guid id) { var result = await _downloadService.DownloadDemoAsync(id); if (result.Succeeded) { var contract = result.Value; return(File(contract.Data, contract.ContentType, contract.FileName)); } return(View("~/Views/Error/DownloadError.cshtml")); }