コード例 #1
0
        public async Task <IActionResult> AddExpense([FromBody] AddExpenseRequest request)
        {
            var expense = request.ToDto();
            await _expenseManerger.AddExpenseAsync(expense);

            return(Created(Request.Path, expense.WrapResponse(Request.Path)));
        }
コード例 #2
0
 public async Task <bool> Post([FromBody] Expense expense)
 {
     return(await _expenseManager.AddExpenseAsync(expense));
 }