コード例 #1
0
        public async Task <IActionResult> Create([FromBody] CreateExpenseTypeReq req)
        {
            var expense = req.toEntity(HttpContext.UserId().Value);
            await expenseRepo.Create(expense);

            return(Created($"/api/expenses/${expense.Id}", expense));
        }