Sports Store is a full-stack e-commerce web application built with ASP.NET Core and C#. The project demonstrates the implementation of an online sports store
with product browsing, category filtering, shopping cart management, checkout and order processing, authentication, and an administrative interface for managing products and orders.
The solution follows a layered structure with separate projects for data access, domain models, repositories, logging, services, the web application and automated tests.
- Browse available sports products
- Filter products by category
- Paginated product listings
- Add and remove products from the shopping cart
- Session-based shopping cart
- Checkout and order submission
- Order completion workflow
- Authenticated administrator access
- Product listing and management
- Create products
- Edit products
- View product details
- Delete products
- View and manage customer orders
- ASP.NET Core Identity authentication
- Blazor-based administrative interface
- C#
- ASP.NET Core 5
- ASP.NET Core MVC
- Razor Pages
- Server-side Blazor
- Entity Framework Core
- SQL Server / SQL Server LocalDB
- ASP.NET Core Identity
- NLog
- xUnit
- Moq
- Coverlet
- HTML
- CSS
- Bootstrap
The solution is separated into multiple projects to provide a clearer separation of responsibilities.
SportsStoreApp
│
├── SportsStore.Data
│ └── Database contexts and data-access configuration
│
├── SportsStore.LoggerService
│ └── Application logging implementation
│
├── SportsStore.Models
│ ├── Entities
│ └── View models
│
├── SportsStore.Repository
│ ├── Repository interfaces
│ └── Repository implementations
│
├── SportsStore.Services
│ └── Service-layer project
│
├── SportsStore.Test
│ └── Automated unit tests
│
└── SportsStore.Web
├── Controllers
├── Razor Pages
├── Blazor admin components
├── Views
├── Middleware
├── Action filters
└── Application configuration
This structure separates persistence, domain models, repository abstractions, presentation logic, logging, and testing concerns.
Data access is abstracted through repository interfaces and implementations. Controllers and UI components work with abstractions rather than directly depending on the database implementation.
Entity Framework Core is used for persistence with SQL Server.
The application maintains data for:
- Products
- Orders
- Shopping cart/order lines
- Application identity
Database migrations and initial seed data are included in the application.
The application uses a session-backed shopping cart. Customers can add products, change cart contents, proceed to checkout, and submit orders.
ASP.NET Core Identity provides authentication for access to administrative functionality.
The administration section uses Server-side Blazor alongside the ASP.NET Core application.
Administrators can manage products and work with submitted orders through the admin interface.
Application logging is separated into the SportsStore.LoggerService project and uses NLog.
The solution contains automated tests covering important application behavior, including:
- Shopping cart operations
- Cart Razor Pages
- Product listing
- Product pagination
- Category navigation
- Order processing
- MVC controllers
- Navigation components
- Custom tag helpers
The testing stack includes:
- xUnit
- Moq
- Microsoft.NET.Test.Sdk
- Coverlet
Run the tests with:
dotnet test SportsStore.Test/SportsStore.Test.csproj
The original project targets:
- .NET 5 SDK
- SQL Server or SQL Server LocalDB
Because .NET 5 is no longer a supported .NET release, running the project in its original form requires the corresponding SDK or upgrading the application to a currently supported .NET version.
git clone https://github.com/Slimcent/SportsStoreApp.git
cd SportsStoreApp
dotnet restoreDatabase connection strings are configured in:
SportsStore.Web/appsettings.json
The application uses separate databases for store data and ASP.NET Core Identity.
Update the connection strings if your SQL Server environment differs from the default LocalDB configuration.
dotnet run --project SportsStore.Web
The application applies pending Entity Framework migrations and seeds development data when it starts.
This project demonstrates practical implementation of several ASP.NET Core development concepts, including:
- Layered application architecture
- Dependency injection
- Repository pattern
- Entity Framework Core
- ASP.NET Core Identity
- MVC controllers and views
- Razor Pages
- Server-side Blazor
- Session management
- Shopping cart workflows
- Order processing
- Database migrations
- Application logging
- Unit testing and mocking
This project was originally developed using ASP.NET Core 5 and represents an implementation of a complete e-commerce workflow using the .NET ecosystem.
Obinna Vincent Achara
GitHub: @Slimcent