In Package Manager Console execute
Update-Database -StartupProject Orders.Api -Project Orders.Infrastructure
This will create a SQLite app.db in the Orders.Infrastructure folder.
Running the project will open the swagger ui page with the Order endpoints. Their is also a .http file in Orders.Api which can be used as well.
- Products are not stored in the database so multiple orderItems could contain the "same" product name
- Project is intending to be for a overall larger project so setup for that "future" with the way its structured compared to using a Minimal Api solution.
- No automated testing added due to time constraints
- No authentication to guard against performing update/delete actions eg by a Staff member
- No validation to make sure order status steps flow from pending -> processing -> shipped -> delivered
- Utilised FluentResults and FluentValidations to implement the Result Pattern to improve clarity, consistency and separation of concerns.
- Use records for DTOs to maintain immutability
- Use of Controllers over Minimal APIs was done for better organisation, complexity handling and familiarity.
- Chose SQLite for the database just for ease of setup in development and sharing of the project.
- Chose EF Core as i'm familiar with it and its quick to get basic CRUD operations up and running. If more complex scenarios came up then custom SQL for performance.