예제 #1
0
        public async Task <ActionResult> DeleteExpenseAsync(Guid id)
        {
            var existingExpense = await _expensesRepository.GetExpenseAsync(id);

            if (existingExpense is null)
            {
                return(NotFound());
            }

            await _expensesRepository.DeleteExpenseAsync(existingExpense.Id);

            return(NoContent());
        }