Esempio n. 1
0
 public async Task HandleAsync(AddIncome command)
 {
     await _incomeService.AddIncomeAsync(command.BudgetId, command.Title, command.Value,
                                         command.Date);
 }
        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));
        }