- .Net Core 9 Web Api.
- Entity Framework Core.
- React 19.
- MySQL.
- User registration and login
- The user can place orders and view order history
- DTO to avoid exposing sensitive data
-
Install .NET 9 SDK and MySQL Server
-
Create and populate the MySQL database using the createDb.sql script.
-
Install dependencies for the front-end:
cd react-appnpm install -
Configure your MySQL connection string in
asp.net-web-api/appsettings.json. -
Build and run the ASP.NET Core Web API:
cd ../asp.net-web-apidotnet builddotnet run -
Start the React app:
cd ../react-appnpm start
To run the unit tests for the Web API:
dotnet test
The test suite includes comprehensive tests for:
- ProductsController (product retrieval)
- OrdersController (order creation, order history, authentication)
- UsersController (user registration, login, profile retrieval)
