public async Task <IActionResult> Report(string rid) { var report = await Service.FindReportAsync(rid); if (report == null || report.SetId != PlagiarismSet.Id) { return(NotFound()); } var subA = await Service.FindSubmissionAsync(report.SetId, report.SubmissionA); var subB = await Service.FindSubmissionAsync(report.SetId, report.SubmissionB); var retA = CodeModel.CreateView(report, c => c.FileA, c => c.ContentStartA, c => c.ContentEndA, subA); var retB = CodeModel.CreateView(report, c => c.FileB, c => c.ContentStartB, c => c.ContentEndB, subB); return(View(new ReportModel(report, retA, retB))); }