public async Task<ActionResult> Index(Guid id) { var preconsented = await mediator.SendAsync(new GetDraftData<Preconsented>(id)); var model = new PreconsentedViewModel(preconsented.AllFacilitiesPreconsented); return View(model); }
public async Task<ActionResult> Index(Guid id, PreconsentedViewModel model) { var preconsented = new Preconsented(id) { AllFacilitiesPreconsented = model.SelectedValue }; await mediator.SendAsync(new SetDraftData<Preconsented>(id, preconsented)); return RedirectToAction("Index", "Exporter"); }