A console-based Employee Management System built with C# and .NET 10.
The project was created to practice and apply advanced C# concepts such as Object-Oriented Programming, Generics, Collections, Delegates, Lambda Expressions, Events, and input validation through a practical employee-management scenario.
The application provides a menu-driven interface that supports:
- Add and manage departments
- Add employees to an onboarding workflow
- Process employee onboarding
- Promote employees to managers
- Register skills for employees
- Search employees by ID or name
- View employees by department
- Filter employees by:
- Manager role
- Minimum salary
- Department
- Calculate average employee salary
- Generate employee count reports by department
- View action history
- Display unique employee skills
- View all employees
- C#
- .NET 10
- Console Application
The project applies OOP principles through entities such as:
EmployeeManagerDepartmentCompany
The application distinguishes between regular employees and managers and supports employee promotion.
Generics are used to create reusable result handling.
Example concept:
Result<Employee>
Result<Manager>
Result<Department>
Result<List<Employee>>
A generic helper is also used to display operation results:
PrintResult<T>(Result<T> result)
This allows different operations to return a consistent success/error structure without duplicating logic.
The project works with different collection-based operations, including:
List<T>
Dictionary<TKey, TValue>
Employee collections
Department collections
Action history
Skill collections
Example use case:
Dictionary<int, int>
is used to generate an employee-count report for each department.
Delegates & Lambda Expressions
Employee filtering is implemented using delegates and lambda expressions.
The application can filter employees by:
Managers Only
Salary Above a Specific Amount
Department
This demonstrates how behavior can be passed dynamically to filtering logic.
Events
The project uses events to react to important employee actions.
Examples include:
Employee onboarded
Employee promoted
Event handlers notify the console when these actions occur.
📊 Employee Filtering
Users can dynamically filter employees based on different criteria.
Examples:
employee => employee is Manager
employee => employee.Salary >= salary
employee => employee.DepartmentId == departmentId
This provides a practical example of using lambda expressions in real application logic.
👤 Employee Data
Employees contain information such as:
Employee ID
Name
Hire Date
Department
Salary
Employees can later be promoted to a Manager role.
🏢 Department Management
The system allows departments to be created and employees to be associated with specific departments.
Users can also:
Display all department employees
Filter employees by department
Generate employee-count reports by department
💰 Salary Analysis
The application includes simple salary analysis functionality.
It can:
Filter employees above a specified salary
Calculate the average salary of all employees
🎯 Skills Management
Skills can be registered for employees.
The application can also display the unique skills currently registered across employees.
📜 Action History
The system tracks performed actions and allows users to display the latest activity history.
This provides a simple example of tracking application operations during runtime.
✅ Input Validation
The console application validates user input before processing it.
Validation is implemented for:
Integer values
Decimal values
Required text values
Dates
Dates are entered using the format:
yyyy-MM-dd
🖥 Application Menu
The application provides the following options:
==========================================
EMPLOYEE MANAGEMENT SYSTEM
==========================================
1. Add Department
2. Add Employee To Onboarding Queue
3. Process Next Onboarding
4. Promote Employee To Manager
5. Register Skill
6. Search Employee
7. Show Department Employees
8. Filter Employees
9. Average Salary
10. Department Report
11. Action History
12. Unique Skills
13. Show All Employees
0. Exit
⚙️ Getting Started
Prerequisites
Make sure you have:
.NET 10 SDK
Visual Studio / Visual Studio Code / Rider
Git
Clone the Repository
git clone https://github.com/dolaaAdel16/EmployeeManagementSystemGenerics.git
Move into the repository:
cd EmployeeManagementSystemGenerics
Run the Application
Using the .NET CLI:
dotnet run --project EmployeeManagementSystemGenerics/EmployeeManagementSystemGenerics.csproj
Then use the console menu to interact with the system.
📚 What I Practiced
Through this project, I practiced:
Object-Oriented Programming
Inheritance
Polymorphism
Generics
Generic result handling
Collections
Delegates
Lambda Expressions
Events
Employee filtering
Console application design
Input validation
Business logic implementation
🔮 Possible Future Improvements
The project can be extended by adding:
SQL Server database persistence
Entity Framework Core
Repository Pattern
Separate service and model layers
Unit Testing
Logging
Exception handling improvements
ASP.NET Core Web API version
👨💻 Author
Ahmed Adel Hassan
Junior .NET Backend Developer