Пример #1
0
        public async Task <IActionResult> Entry(ExpenseToCreateDTO expenseToCreate)
        {
            var newEntry = new Expenses
            {
                Name        = expenseToCreate.Name,
                Date        = expenseToCreate.Date,
                Amount      = expenseToCreate.Amount.ToString(),
                Description = expenseToCreate.Description
            };

            // Uses the repository to create an entry in the Database..
            var createdEntry = await _repo.EnterExpense(newEntry);

            return(StatusCode(201));
        }