A .NET Core MVC application for product management.
- BusinessObjects: Contains entity models (Product, Category, AccountMember)
- DataAccessObjects: Database context and data access layer
- Repositories: Repository pattern implementation
- Services: Business logic services
- ProductManagementASPNETCoreMVC: MVC web application
sequenceDiagram
actor User
participant AC as AccountController
participant PC as ProductsController
participant PS as ProductService
participant PR as ProductRepository
participant PDAO as ProductDAO
participant DB as Database
User->>AC: Login with credentials
AC->>User: Redirects to Products page
User->>PC: Request Products Index
PC->>PS: GetProducts()
PS->>PR: GetProducts()
PR->>PDAO: GetProducts()
PDAO->>DB: SQL Query
DB->>PDAO: Product Data
PDAO->>PR: Product List
PR->>PS: Product List
PS->>PC: Product List
PC->>User: Display Products View
User->>PC: Create/Edit/Delete Product
PC->>PS: SaveProduct/UpdateProduct/DeleteProduct
PS->>PR: SaveProduct/UpdateProduct/DeleteProduct
PR->>PDAO: SaveProduct/UpdateProduct/DeleteProduct
PDAO->>DB: SQL Commands
DB->>PDAO: Confirmation
PDAO->>PR: Result
PR->>PS: Result
PS->>PC: Result
PC->>User: Redirect to Products Index
- .NET SDK 8.0 or later
- SQL Server with a database named "MyStore"
-
Open Command Prompt: Open a command prompt window (cmd) or PowerShell.
-
Navigate to Project Directory: Navigate to the main project directory:
cd d:\ASP\SEM7\ProductManagement.Razor\ProductManagementASPNETCoreMVC -
Restore Dependencies: Restore all the NuGet packages:
dotnet restore -
Build the Project:
dotnet build -
Run the Application:
dotnet run -
Access the Application: Once running, the application should be accessible at:
(The exact ports may vary based on your configuration)
-
Login: The application will start at the login page since the default route is set to the Account/Login page.
-
Run with specific environment:
dotnet run --environment Development -
Run with a specific port:
dotnet run --urls="http://localhost:8080" -
Run in Watch mode (automatically recompiles when code changes):
dotnet watch run
- The application uses Entity Framework Core and expects a SQL Server database called "MyStore" to be available.
- Make sure the connection string in the appsettings.json file is configured correctly for your environment.