This is a backend module for calculating employee payroll in a simulated HR or financial system.
It was built using ASP.NET Core and follows clean code and SOLID principles.
- Calculates net payroll based on base salary, bonus, and tax rate.
- Exposes a REST API endpoint for payroll calculation.
- Organized into Models, Controllers, and Services using dependency injection.
- Easy to extend and integrate into larger systems.
- .NET Core
- C#
- ASP.NET Web API
- Dependency Injection
- Entity Framework Core (placeholder for DB)
- Swagger (suggested for API testing)
PayrollModule/
βββ Controllers/
β βββ PayrollController.cs
βββ Models/
β βββ Employee.cs
βββ Services/
β βββ PayrollService.cs
- Clone the repository
- Add to a new ASP.NET Core Web API project
- Register
IPayrollServiceandPayrollServiceinStartup.cs - Use Swagger or Postman to test the endpoint:
POST /api/payroll/calculate { "name": "Alice", "baseSalary": 3000, "bonus": 500, "taxRate": 0.15 }
This is a simulated project created for portfolio demonstration purposes. It does not contain business-sensitive or proprietary code.
Created by Anderson Enrique LΓ‘zaro Moreno
Barcelona, Spain