An ASP.NET Core MVC web application using Identity, Entity Framework Core, and LINQ. This role-based job portal includes Admin, Employer, and Jobseeker roles with CRUD functionality based on user permissions. The app follows clean architecture principles and includes unit testing with xUnit.
- User Registration & Login with ASP.NET Core Identity
- Role-based access:
- Admin: Full control (users, jobs, all data)
- Employer: Can post and manage own job listings
- Jobseeker: Can browse and view job listings
- Seeded default users for each role
- Add/Edit/Delete/View job posts
- Design pattern architecture (e.g., Repository, Service)
- Unit testing with xUnit
- ASP.NET Core MVC
- Entity Framework Core (EF Core)
- ASP.NET Identity
- LINQ
- xUnit
- SQL Server / SQLite (for local dev or testing)
git clone https://github.com/yourusername/aspnetcore-jobportal.git
cd aspnetcore-jobportal- Configure Database Connection In appsettings.json, update the DefaultConnection string to point to your local SQL Server or SQLite:
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=JobPortalDb;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}💡 You can use SQLite or another provider if preferred—just update the DbContext options in Program.cs.
Apply Migration to Create the DB:
dotnet ef database updateRunning the App
dotnet runDefault user:
| Role | Password | |
|---|---|---|
| Admin | Admin@test.com | Admin@1234 |
| Employer | Employer@test.com | Employer@1234 |
| Jobseeker | JobSeeker@test.com | JobSeeker@1234 |
Run UnitTest:
dotnet testProject Structure:
/Controllers # MVC controllers
/Models # Domain and view models
/Data # DbContext, Migrations, and Seed logic
/Services # Business services and patterns
/Views # Razor Views
/Tests # xUnit test projectsUseful EF Core Commands
# Create a new migration
dotnet ef migrations add YourMigrationName
# Apply pending migrations
dotnet ef database update
# Remove last migration
dotnet ef migrations remove
# List migrations
dotnet ef migrations listEnsure you have Microsoft.EntityFrameworkCore.Tools installed for EF CLI support.
📄 License MIT License – free for personal and educational use.
👨💻 Author: Built with ❤️ by ArManDS