public async Task <IActionResult> OnPostCreateRecruitmentCampaign() { var result = await _engine.Execute(CreateRecruitmentCampaignCommand); if (result.IsFailure) { CommonPageModelExtensions.AddModelErrors(ModelState, result.Error); } return(await OnGet(CreateRecruitmentCampaignCommand.EditionID)); }
public async Task <IActionResult> OnPost() { var result = await _engine.Execute(Command); if (result.IsFailure) { CommonPageModelExtensions.AddModelErrors(ModelState, result.Error); return(await OnGet(CampaignID)); } else { return(RedirectToPage(RecruitmentFormSubmittedModel.PageName, new { email = Command.Email.ToString() })); } }