public async Task <ActionResult> Victim(VictimViewModel viewModel) { if (!ModelState.IsValid) { return(View(viewModel)); } var report = await GetCurrentReport(); _modelFactory.Modify(report, viewModel); await _reportProxy.PatchAsync(report.Id, report); // TODO: add error handling return(RedirectToAction("Vehicle")); }
public void Modify(Report report, VictimViewModel viewModel) { report.Victim = viewModel.Victim; }
public async Task<ActionResult> Victim(VictimViewModel viewModel) { if (!ModelState.IsValid) { return View(viewModel); } var report = new Report(); _modelFactory.Modify(report, viewModel); await _reportProxy.PatchAsync(GetCurrentReportId(), report); // TODO: add error handling return RedirectToAction("Vehicle"); }