public ActionResult Scenario(long id) { ScenarioExecution execution = executionService.GetById(id); IEnumerable <Snapshot> snapshots = snapshotService.GetByScenarioExecution(execution); IList <SnapshotModel> snapshotModel = mapper.Map <IEnumerable <Snapshot>, IList <SnapshotModel> >(snapshots); var reportModel = new ReportModel { ExecutionId = id, Snapshots = snapshotModel, Status = execution.Status.ToString() }; var json = JsonConvert.SerializeObject(reportModel); var model = new ReportViewModel { Report = reportModel, Json = new MvcHtmlString(json) }; return(View(model)); }