This project is a .NET Web API application. It allows users to create and list expenses, ensuring that some validation rules are applied. I am using SQL Server Database to persist datas.
The ExpensesAPI project provides a REST API to:
- Create expenses
- List expenses
- Expenses: An expense is characterized by a user, date, type (Restaurant, Hotel, Misc), amount, currency, and a comment.
- Users: A user is characterized by a last name, first name, and a default currency for their expenses.
-
Creating an Expense:
- An expense cannot have a date in the future.
- An expense cannot be dated more than 3 months ago.
- The comment is mandatory.
- A user cannot declare the same expense twice (same date and amount).
- The currency of the expense must match the user’s currency.
-
Listing Expenses
-
Creating Users
-
Listing Users
- .NET Core
- Entity Framework Core
- SQL Server
- Swagger for API documentation
- Moq and xUnit for unit testing