Web application for managing laboratory supplies, suppliers, and purchase orders. Built with ASP.NET Core MVC and Entity Framework Core.
- Track lab supplies with quantity monitoring and reorder alerts
- Manage supplier information and contact details
- Create and track purchase orders with partial fulfillment support
- Upload product images
- Role-based access control (Admin/User roles)
- Responsive Bootstrap UI with DataTables
- AJAX operations and form validation
Backend: ASP.NET Core 8.0 MVC, Entity Framework Core, SQL Server, ASP.NET Core Identity
Frontend: Bootstrap 5, jQuery, DataTables, SweetAlert2
Patterns: Repository Pattern, Unit of Work, Dependency Injection
Layered architecture with clear separation:
Presentation → Models → Data Access → Database
See ARCHITECTURE.md for details.
- .NET 8.0 SDK or later
- SQL Server (LocalDB, Express, or higher)
- Visual Studio 2022 or Visual Studio Code
- Git
-
Clone the repository
git clone https://github.com/Karinateii/InventoryManagement.git cd InventoryManagement -
Configure the database connection
Update the connection string in
appsettings.json:{ "ConnectionStrings": { "DefaultConnection": "Server=(LocalDb)\\MSSQLLocalDb;Database=LIMS;Trusted_Connection=True;TrustServerCertificate=True;" } } -
Restore NuGet packages
dotnet restore
-
Apply database migrations
cd InventoryManagement dotnet ef database update -
Run the application
dotnet run
-
Access the application
Navigate to:
https://localhost:5001
InventoryManagement/
├── Inventory.DataAccess/ # Data access layer
│ ├── Data/
│ │ └── AppDbContext.cs # EF Core DbContext
│ ├── Migrations/ # EF Core migrations
│ └── Repository/ # Repository implementations
│ ├── IRepository/ # Repository interfaces
│ ├── Repository.cs # Generic repository
│ ├── LabSupplyRepository.cs
│ ├── SupplierRepository.cs
│ └── UnitOfWork.cs
│
├── Inventory.Models/ # Domain models and ViewModels
│ ├── Models/
│ │ ├── LabSupply.cs
│ │ ├── Supplier.cs
│ │ ├── PurchaseOrder.cs
│ │ └── ErrorViewModel.cs
│ ├── ViewModels/
│ │ └── LabSupplyVM.cs
│ └── ApplicationUser.cs # Extended Identity user
│
├── Inventory.Utility/ # Cross-cutting concerns
│ ├── SD.cs # Static constants
│ └── EmailSender.cs # Email service
│
└── InventoryManagement/ # Main web application
├── Areas/
│ ├── Admin/ # Admin area
│ │ ├── Controllers/
│ │ └── Views/
│ ├── Identity/ # Identity scaffolded pages
│ └── User/ # User area
├── Controllers/ # Root controllers
├── Views/ # Razor views
├── wwwroot/ # Static files
│ ├── css/
│ ├── js/
│ └── images/
├── appsettings.json
└── Program.cs # Application entry point
LabSupply
SupplyID(PK)SupplyNameQuantityOnHandReorderPointImageURLSupplierID(FK → Supplier)
Supplier
SupplierID(PK)SupplierNameContactPersonContactEmail
PurchaseOrder
OrderID(PK)SupplyID(FK → LabSupply)OrderDateQuantityOrderedOrderStatus
- One-to-Many: Supplier → LabSupplies
- One-to-Many: LabSupply → PurchaseOrders
| Method | Endpoint | Description |
|---|---|---|
| GET | /Admin/LabSupplies/Index |
List all supplies |
| GET | /Admin/LabSupplies/Upsert/{id?} |
Create/Edit form |
| POST | /Admin/LabSupplies/Upsert |
Create/Update supply |
| GET | /Admin/LabSupplies/GetAll |
JSON data for DataTables |
| DELETE | /Admin/LabSupplies/Delete/{id} |
Delete supply (AJAX) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /Admin/Suppliers/Index |
List all suppliers |
| GET | /Admin/Suppliers/Create |
Create form |
| POST | /Admin/Suppliers/Create |
Create supplier |
| GET | /Admin/Suppliers/Edit/{id} |
Edit form |
| POST | /Admin/Suppliers/Edit |
Update supplier |
| GET | /Admin/Suppliers/Delete/{id} |
Delete confirmation |
| POST | /Admin/Suppliers/Delete |
Delete supplier |
| Method | Endpoint | Description |
|---|---|---|
| GET | /PurchaseOrders/Index |
List all orders |
| GET | /PurchaseOrders/Create |
Create form |
| POST | /PurchaseOrders/Create |
Create order |
| GET | /PurchaseOrders/Edit/{id} |
Edit form |
| POST | /PurchaseOrders/Edit |
Update order |
| GET | /PurchaseOrders/Delete/{id} |
Delete confirmation |
| POST | /PurchaseOrders/Delete |
Delete order |
dotnet builddotnet testcd Inventory.DataAccess
dotnet ef migrations add MigrationName --startup-project ../InventoryManagementPull requests are welcome. For major changes, please open an issue first.
This project is licensed under the MIT License - see the LICENSE file for details.
Doutimiwei Ebenezer
- GitHub: @Karinateii
- LinkedIn: Ebenezer Doutimiwei
- Email: karinateidoutimiwei@gmail.com