This project is an Employee Management System built using ASP.NET Core MVC. It allows for the management of employees and their respective departments. The application supports all CRUD (Create, Read, Update, Delete) operations for both employees and departments. The project follows a three-tier architecture and implements the Repository pattern and Unit of Work.
- ASP.NET Core MVC
- Entity Framework Core
- SQL Server
- Dependency Injection
- Repository Pattern
- Unit of Work Pattern
- Identity (Authentication & Authorization)
The project is structured into three layers:
- Presentation Layer: This layer contains the ASP.NET Core MVC application, including controllers, views, and view models.
- Business Logic Layer: This layer contains the business logic of the application, including services and business rules.
- Data Access Layer: This layer contains the data access logic, including repositories and the Entity Framework Core context.
- Employee Management: Create, read, update, and delete employee records.
- Department Management: Create, read, update, and delete department records.
- Repository Pattern: Abstracts the data access logic and provides a flexible way to manage data operations.
- Unit of Work Pattern: Manages transactions and ensures that a group of operations either all succeed or all fail.
- .NET Core SDK
- SQL Server
- Clone the repository:
git clone https://github.com/iHebaMohammed/route-mvc-task.git
- Navigate to the project directory:
cd route-mvc-task
- Restore the dependencies:
dotnet restore
- Update the database connection string in ''appsettings.json'':
"ConnectionStrings": { "DefaultConnection": "Server=your_server;Database=MVCDbContextRoute;Trusted_Connection=True;" }
- Apply the migrations to create the database:
dotnet ef database update
- Run the application:
dotnet run
- Open a browser and navigate to https://localhost:5001 to access the application.
Contains the MVC controllers for handling HTTP requests.
Contains the Razor views for rendering the UI.
Contains the data models for employees and departments.
Contains the repository classes for data access.
Contains the business logic services.
Contains the Unit of Work implementation.
Contributions are welcome! Please fork the repository and submit a pull request.