Exemplo n.º 1
0
 public async Task HandleAsync(AddIncome command)
 {
     await _incomeService.AddIncomeAsync(command.BudgetId, command.Title, command.Value,
                                         command.Date);
 }
Exemplo n.º 2
0
        public async Task <IActionResult> AddIncome([FromBody] IncomeDto incomeDto)
        {
            var income = await _incomeService.AddIncomeAsync(incomeDto, User.Identity.Name);

            return(CreatedAtRoute("GetIncome", new { incomeId = income.Id }, income));
        }