Ejemplo n.º 1
0
        public async Task <CreateBudgetPlannerResponse> Handle(CreateBudgetPlannerRequest request, CancellationToken cancellationToken)
        {
            var budgetPlanner = _mapperProvider.Map <CreateBudgetPlannerRequest, Budget>(request);

            budgetPlanner = await _budgetPlannerService.Save(budgetPlanner, cancellationToken);

            return(Response.Success <CreateBudgetPlannerResponse>(budgetPlanner));
        }
Ejemplo n.º 2
0
        public async Task Process(CreateTransactionRequest request, CreateTransactionResponse response, CancellationToken cancellationToken)
        {
            var budget = await _budgetPlannerService.GetBudgetPlanner(request.BudgetId, cancellationToken);

            response.Reference       = budget.Reference;
            budget.LastTransactionId = response.Result.Id;
            await _budgetPlannerService.Save(budget, cancellationToken);
        }