Beispiel #1
0
        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 });
        }
Beispiel #2
0
        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 });
        }