public async Task <ActionResult> Rejected(RejectedTransferConnectionInvitationViewModel model) { switch (model.Choice) { case "Confirm": await _mediator.SendAsync(new DeleteTransferConnectionInvitationCommand { AccountId = model.AccountId, TransferConnectionInvitationId = model.TransferConnectionInvitationId, UserRef = model.UserRef }); return(RedirectToAction("Deleted")); case "GoToTransfersPage": return(RedirectToAction("Index", "Transfers")); default: throw new ArgumentOutOfRangeException(nameof(model.Choice)); } }