Employee Management System lets you keep track of employees information. There are two types of users admin and employee. Employee can request leave, concern and view holidays. Admin can add holidays, approve/disapprove leave status submitted by employees. This application is built using .NET Core 3.1, C#, MVC, Entity Framework and PostgreSql.
The engine, or logic layer of the application, consists of 'Employee', 'Concern', 'Holiday' and 'Leave' models.
The 'EmployeeManagement' class is the main engine class. This is where the main actions of the application are defined. This includes CRUD operations on the Employee object , Concern object, Holiday object and Leave object
The application uses a Postgres database provisioned using a free tier of ElephantSQL. There are separate databases for dev and prod. Entity Framework Core is used for the database and a storage interface layer sits on top of the EF layer.
The Employee engine class specifies only the interface, and is not tied to the EF Core implementation, so it can be swapped out without affecting the logic.
The operations exposed to the user include the CRUD operations on a employee as well as concern, holiday and leave. This is all handled from the EmployeeController, ConcernController, HolidayController and LeaveController.
The Form.cshtml view is re-used for both creation and editing, and is toggled using a trigger on the ViewBag.
The identity was scaffolded using the .NET core identity tool. It largely uses the default setup, however, integration with SendGrid has been added for confirming email addresses on registration.
The following command can be used to generate the custom identity pages:
dotnet aspnet-codegenerator identity -dc GardenIt.Models.Storage.ApplicationDbContext --files "Account.Register;Account.Login;Account.RegisterConfirmation"
To deploy this application:
- Create an App Service in Azure
- Ensure the Azure App Service extension is installed in VS Code
- Ensure the extension is synced to your Azure account
- Create a publish folder:
dotnet publish -c Release -o ./publish
- Deploy by right clicking on the publish folder and deploying to the web app
The application is available at: https://employeemgt.azurewebsites.net