This project is an Employee Management System built with C# and SQL Server.
It provides basic CRUD functionality (Create, Read, Update, Delete) to manage employee records.
- Add, view, update, and delete employees
- Store details such as: name, email, position, department, hire date, salary, etc.
- Search and filter employees
- SQL Server database integration
- C# (.NET Framework / .NET Core)
- SQL Server / SQL Server Express
- ADO.NET or Entity Framework Core (depending on your implementation)
- Git / GitHub
- .NET SDK (e.g., .NET 6.0 or the .NET Framework version you used)
- SQL Server (or LocalDB / SQL Express)
- Visual Studio or VS Code
git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name>CREATE DATABASE EmployeeDB;
GO
USE EmployeeDB;
GO
CREATE TABLE Employees (
Id INT IDENTITY(1,1) PRIMARY KEY,
FirstName NVARCHAR(100) NOT NULL,
LastName NVARCHAR(100) NOT NULL,
Email NVARCHAR(200),
Position NVARCHAR(100),
Department NVARCHAR(100),
HireDate DATE,
Salary DECIMAL(18,2),
CreatedAt DATETIME DEFAULT GETDATE()
);
GO
INSERT INTO Employees (FirstName, LastName, Email, Position, Department, HireDate, Salary)
VALUES
('Ahmed', 'Ali', 'ahmed.ali@example.com', 'Developer', 'IT', '2020-01-15', 60000),
('Fadumo', 'Mohamed', 'fadumo.m@example.com', 'HR Manager', 'HR', '2019-07-01', 75000);
GO{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=EmployeeDB;Trusted_Connection=True;"
}
}
<connectionStrings>
<add name="DefaultConnection"
connectionString="Server=.;Database=EmployeeDB;Trusted_Connection=True;"
providerName="System.Data.SqlClient" />
</connectionStrings>
dotnet build
dotnet run --project ./Path/To/YourProject.csproj
-
When running the system, you can:
-
Add new employees
-
List all employees
-
Update employee details
-
Delete employees
-
Example console menu:
1) List employees
2) Add new employee
3) Update employee
4) Delete employee
5) Exit
-
Always use parameterized queries or Entity Framework to avoid SQL Injection.
-
Do not hardcode database credentials inside code – use environment variables or secrets.
-
Keep your code clean with meaningful names and comments.
-
Fork the repo
-
Create a new branch
git checkout -b feature/my-feature
-
Commit your changes
-
Push to your fork
-
git push origin feature/my-feature
📄 License
You can add a license (MIT, Apache 2.0, etc.) depending on your choice.
- Name: Your Name
- Email: 📧 amixiid@gmail.com
- GitHub: amixiid1