Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Employee Management Application

A full-stack Employee Management application built with ASP.NET Core 9 Web API and Vue 3.

Prerequisites

Project Structure

3PillarsAssessment/
├── Backend/
│   ├── EmployeeManagement.API/          # ASP.NET Core Web API (port 5112)
│   ├── EmployeeManagement.Core/         # Domain models, DTOs, interfaces
│   └── EmployeeManagement.Infrastructure/ # EF Core, repositories, migrations
└── frontend/                            # Vue 3 + Vite (port 5173)

Backend Setup

  1. Navigate to the API project:

    cd Backend/EmployeeManagement.API
  2. Apply database migrations (creates the EmployeeManagementDb database on LocalDB):

    dotnet ef database update --project ../EmployeeManagement.Infrastructure
  3. Run the API:

    dotnet run

    The API will be available at http://localhost:5112.
    Swagger UI: http://localhost:5112/swagger

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev

    The app will be available at http://localhost:5173.

Running the Application

Start the backend first, then the frontend. Both must be running simultaneously.

Service URL
Frontend http://localhost:5173
API http://localhost:5112/api
Swagger http://localhost:5112/swagger

Features

  • Add, edit, and delete employees via modal dialogs (no page reloads)
  • Search employees by full name or email
  • Filter employees by department
  • Client-side and server-side validation
  • Duplicate email detection

API Endpoints

Method Endpoint Description
GET /api/employees List employees (supports ?search= and ?department=)
GET /api/employees/{id} Get employee by ID
POST /api/employees Create employee
PUT /api/employees/{id} Update employee
DELETE /api/employees/{id} Delete employee

Database Migrations

Migration files are located in Backend/EmployeeManagement.Infrastructure/Migrations/.

To add a new migration after model changes:

cd Backend/EmployeeManagement.API
dotnet ef migrations add <MigrationName> --project ../EmployeeManagement.Infrastructure
dotnet ef database update --project ../EmployeeManagement.Infrastructure

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages