Learn about ASP.NET Core MVC, Razor, EF Core, Clean Architecture, Caching... in this project
JavaScript
4
108 commits
updated Apr 6, 2026
A demonstration of an e-commerce backend and foundational architecture built with ASP.NET Core MVC, Razor, Entity Framework Core, and Clean Architecture principles, including caching and comprehensive unit/integration tests. The solution illustrates separation of concerns across domain, application, and infrastructure layers, backed by SQL Server.
User Operations
Administrator Operations
OnlineShop.sln # Solution file
/Entities # Domain entities and value objects
/UseCase # Application services (business logic interfaces)
/UseCase.Caching # Caching decorators for use cases
/UseCase.Tests # Unit tests for application logic
/Infrastructure # Core abstractions for data access
/Infrastructure.SqlServer # SQL Server implementation (EF Core)
/Infrastructure.SqlServer.Tests # Integration tests for data layer
Clone the repository
git clone https://github.com/truongnhat96/OnlineShop.git
cd OnlineShop
Restore NuGet packages & build
dotnet restore
dotnet build
Database migrations
cd Infrastructure.SqlServer
dotnet ef database update
Run the web project
dotnet run --project WebUI/WebUI.csproj
Note: Replace
WebUI/WebUI.csprojwith your front-end project path if different.
Add a .env or appsettings.json entry for:
{
"ConnectionStrings": {
"DefaultConnection": "Server=.;Database=OnlineShop;Trusted_Connection=True;"
},
"VNPAY": {
"Url": "https://sandbox.vnpayment.vn/paymentv2/vpcpay.html",
"TmnCode": "YourVnpayTerminal",
"HashSecret": "YourVnpayHashSecret"
},
"MOMO": {
"Endpoint": "https://test-payment.momo.vn/gw_payment/transactionProcessor",
"PartnerCode": "YourMomoPartnerCode",
"AccessKey": "YourMomoAccessKey",
"SecretKey": "YourMomoSecretKey"
}
}
UseCase.Caching layerRun all tests using:
dotnet test
UseCase.Tests projectInfrastructure.SqlServer.Tests projectContributions are welcome:
git checkout -b feature/xyz)git commit -m "Add xyz feature")git push origin feature/xyz)Please ensure code style consistency and passing tests.
This project is licensed under the MIT License. See LICENSE for details.
© 2025 Lương Nhật Trường. All rights reserved.
Learn about ASP.NET Core MVC, Razor, EF Core, Clean Architecture, Caching... in this project
JavaScript
4
108 commits
updated Apr 6, 2026
A demonstration of an e-commerce backend and foundational architecture built with ASP.NET Core MVC, Razor, Entity Framework Core, and Clean Architecture principles, including caching and comprehensive unit/integration tests. The solution illustrates separation of concerns across domain, application, and infrastructure layers, backed by SQL Server.
User Operations
Administrator Operations
OnlineShop.sln # Solution file
/Entities # Domain entities and value objects
/UseCase # Application services (business logic interfaces)
/UseCase.Caching # Caching decorators for use cases
/UseCase.Tests # Unit tests for application logic
/Infrastructure # Core abstractions for data access
/Infrastructure.SqlServer # SQL Server implementation (EF Core)
/Infrastructure.SqlServer.Tests # Integration tests for data layer
Clone the repository
git clone https://github.com/truongnhat96/OnlineShop.git
cd OnlineShop
Restore NuGet packages & build
dotnet restore
dotnet build
Database migrations
cd Infrastructure.SqlServer
dotnet ef database update
Run the web project
dotnet run --project WebUI/WebUI.csproj
Note: Replace
WebUI/WebUI.csprojwith your front-end project path if different.
Add a .env or appsettings.json entry for:
{
"ConnectionStrings": {
"DefaultConnection": "Server=.;Database=OnlineShop;Trusted_Connection=True;"
},
"VNPAY": {
"Url": "https://sandbox.vnpayment.vn/paymentv2/vpcpay.html",
"TmnCode": "YourVnpayTerminal",
"HashSecret": "YourVnpayHashSecret"
},
"MOMO": {
"Endpoint": "https://test-payment.momo.vn/gw_payment/transactionProcessor",
"PartnerCode": "YourMomoPartnerCode",
"AccessKey": "YourMomoAccessKey",
"SecretKey": "YourMomoSecretKey"
}
}
UseCase.Caching layerRun all tests using:
dotnet test
UseCase.Tests projectInfrastructure.SqlServer.Tests projectContributions are welcome:
git checkout -b feature/xyz)git commit -m "Add xyz feature")git push origin feature/xyz)Please ensure code style consistency and passing tests.
This project is licensed under the MIT License. See LICENSE for details.
© 2025 Lương Nhật Trường. All rights reserved.