A comprehensive web-based Employee Attendance and HR Management Application engineered with ASP.NET MVC 5 and Entity Framework 6. This system automates attendance tracking, simplifies employee profile management, and provides role-based administrative workflows for organizations.
The application is designed to bridge the gap between human resource administrators and employees:
- Administrators can onboard employees, assign roles, manage departments, and audit organization-wide attendance records with date-range filtering.
- Employees can log into their secure portal to view their personal daily attendance logs, arrival times, and departure records.
- Authentication relies on custom serialized JSON identity tokens stored in user claims for fast session lookup without redundant database queries.
| Layer | Technologies Used |
|---|---|
| Framework | ASP.NET MVC 5 (.NET Framework 4.8) |
| Database / ORM | Entity Framework 6.4 (Code-First with Migrations), SQL Server |
| Language | C# |
| Frontend | Razor Engine (.cshtml), Bootstrap 3.4, jQuery 3.6, Modernizr |
| UI Components | jQuery UI, jQuery DateTimePicker, Moment.js |
| Utilities & Plugins | PagedList.Mvc (Pagination), Application Insights, Newtonsoft.Json |
- Role-Based Access Control: Distinct operational permissions for
Adminand standard user roles. - Secure Identity Management: Encrypted password verification, password confirmation validation, and email format attributes.
- Claim Serialization: Employs
Newtonsoft.Jsonto serialize employee metadata directly intoUser.Identity.Namefor lightweight session persistence.
- Full CRUD Operations: Create, read, update, and delete employee profiles with salary and birthdate tracking.
- Dynamic Dropdowns: Asynchronous loading and binding of Departments, States, and Cities for employee onboarding.
- Pagination & Sorting: Server-side paginated lists using
PagedListto efficiently render large employee datasets.
- Personal Log Portal: Employees can view their individual chronological attendance logs (
ComingTime,LeaveTime,DateOfDay). - Organization-Wide Audit: Administrators can view attendance records across all employees.
- Date-Range Filtering: Filter attendance history by specific employees and custom date intervals (
startandendtimestamps).
The project utilizes Entity Framework Code-First architecture (EmployeeDBContext pointing to the "Default" connection string).
Employee: Core user profile storingFirstName,LastName,salary,BirthDate,Email,Password,UserRoles,DeptID,StateID, andCityID.Attendance: Daily time logs capturingComingTime,LeaveTime,DateOfDay,LeaveCount, and foreign keyEmployeeID.Department: Department categorization (DeptID,DeptName).States&CityTable: Lookup tables for geographic state and city mapping.
- Visual Studio 2019 / 2022 with ASP.NET and web development workload.
- .NET Framework 4.8 Runtime / Developer Pack.
- SQL Server Express or LocalDB.
- Clone or Open the Solution:
Open
AttendanceApp.slnin Visual Studio. - Restore NuGet Packages:
Right-click the solution in Solution Explorer and select Restore NuGet Packages (or run
nuget restore). - Configure Database Connection:
Open
AttendanceApp/Web.configand verify the<connectionStrings>section for the"Default"database connection. - Apply EF Migrations:
Open Tools > NuGet Package Manager > Package Manager Console and execute:
Update-Database - Run the Application: Press F5 or Ctrl + F5 to launch the web app via IIS Express.
AttendanceApp/
├── App_Start/ # MVC Bundle, Filter, and Route configurations
├── Content/ # Bootstrap CSS, custom stylesheets, and themes
├── Controllers/ # Application logic and routing
│ ├── AccountController.cs # Authentication & login/logout workflows
│ ├── EmployeesController.cs # Employee administration & CRUD
│ ├── HomeController.cs # Dashboard and landing pages
│ └── MyAttendanceController.cs # Attendance logging and date-range reporting
├── DAL/ # Data Access Layer
│ └── EmployeeDBContext.cs # EF DbContext & DbSet definitions
├── Migrations/ # Entity Framework Code-First schema migrations
├── Models/ # Domain entities and ViewModels
│ ├── Employee.cs / Attendance.cs / Department.cs
│ └── AccountViewModels.cs / AppUsersRoles.cs
├── Scripts/ # jQuery, Moment.js, Bootstrap, and validation scripts
└── Views/ # Razor (.cshtml) UI templates grouped by controller