public async Task<ActionResult> Create(InvestViewModel vm) { var action = new InvestmentCreateRequest(_sequenceService.Next(SequenceID.ACE_Investment, 1), vm.AccountId, vm.ProjectId, vm.Amount); var response = await ActionBus.SendAsyncWithRetry<InvestmentActionBase, InvestmentCreateRequest>(action, 3); TempData["ActionResponse"] = response; return RedirectToAction("Index", new { id = action.InvestmentId }); }
public async Task <ActionResult> Create(InvestViewModel vm) { var action = new InvestmentCreateRequest(_sequenceService.Next(SequenceID.ACE_Investment, 1), vm.AccountId, vm.ProjectId, vm.Amount); var response = await ActionBus.SendAsyncWithRetry <InvestmentActionBase, InvestmentCreateRequest>(action, 3); TempData["ActionResponse"] = response; return(RedirectToAction("Index", new { id = action.InvestmentId })); }
public ActionResult Create(InvestViewModel vm) { var action = new InvestmentCreateRequest(_sequenceService.Next(SequenceID.ACE_Investment, 1), vm.AccountId, vm.ProjectId, vm.Amount); try { ActionStation.Invoke<InvestmentCreateRequest>(action); } catch (BusinessException ex) { TempData["ActionResponse"] = ex.Message; } return RedirectToAction("Index", new { id = action.InvestmentId }); }
public ActionResult Create(InvestViewModel vm) { var action = new InvestmentCreateRequest(_sequenceService.Next(SequenceID.ACE_Investment, 1), vm.AccountId, vm.ProjectId, vm.Amount); try { ActionStation.Invoke <InvestmentCreateRequest>(action); } catch (BusinessException ex) { TempData["ActionResponse"] = ex.Message; } return(RedirectToAction("Index", new { id = action.InvestmentId })); }
public async Task<ActionResult> Create(InvestViewModel vm) { var action = new InvestmentCreateRequest { InvestmentId = _sequenceService.Next(SequenceID.ACE_Investment, 1), AccountId = vm.AccountId, ProjectId = vm.ProjectId, Amount = vm.Amount }; var response = await ServiceLocator.ActionBus.SendAsync(action); //var response = ServiceLocator.ActionBus.Send(action); TempData["ActionResponse"] = response; return RedirectToAction("Index", new { id = action.InvestmentId }); }
public async Task <ActionResult> Create(InvestViewModel vm) { var action = new InvestmentCreateRequest { InvestmentId = _sequenceService.Next(SequenceID.ACE_Investment, 1), AccountId = vm.AccountId, ProjectId = vm.ProjectId, Amount = vm.Amount }; var response = await ServiceLocator.ActionBus.SendAsync(action); //var response = ServiceLocator.ActionBus.Send(action); TempData["ActionResponse"] = response; return(RedirectToAction("Index", new { id = action.InvestmentId })); }