Employee Management tool built with Angular 14, .Net 6 Web API using Entity Framework Core
The API implements CRUD operations
The API stores the data using SQL Server Database and the Database operations are performed using Entity Framework Core & EF Migrations
The API is built based on the YouTube video Angular 14 CRUD with .NET 6 Web API using Entity Framework Core - Full Course
Simply follow below steps:
- For API:
git clone https://github.com/saideepd/employee-management
cd FullStack API\FullStack.API
dotnet run --project FullStack.API
- For UI:
git clone https://github.com/saideepd/employee-management
cd FullStack UI\FullStack.UI
npm install
ng serve -o
GET /api/Employees
200 OK
[
{
"id": "61fbabe5-7e0d-46d7-865c-73f1f6443c71",
"name": "Jane Doe",
"email": "jane@abc.com",
"phone": 325345345,
"salary": 4524223,
"department": "HR"
},
{
"id": "6653b0b4-3e63-4b47-82ab-9b497cab01b9",
"name": "John Doe",
"email": "john@abc.com",
"phone": 9829478249,
"salary": 345432,
"department": "IT"
}
]
GET /api/Employees/{{id}}
200 OK
[
{
"id": "6653b0b4-3e63-4b47-82ab-9b497cab01b9",
"name": "John Doe",
"email": "john@abc.com",
"phone": 9829478249,
"salary": 345432,
"department": "IT"
}
]
POST /api/Employees
Body
{
"name": "John Doe",
"email": "john@abc.com",
"phone": 9829478249,
"salary": 345432,
"department": "IT"
}
200 OK
[
{
"id": "6653b0b4-3e63-4b47-82ab-9b497cab01b9",
"name": "John Doe",
"email": "john@abc.com",
"phone": 9829478249,
"salary": 345432,
"department": "IT"
}
]
PUT /api/Employees/{{id}}
Body
{
"name": "John Doe",
"email": "john@abc.com",
"phone": 9876543210,
"salary": 54000,
"department": "IT Manager"
}
200 OK
[
{
"id": "6653b0b4-3e63-4b47-82ab-9b497cab01b9",
"name": "John Doe",
"email": "john@abc.com",
"phone": 9876543210,
"salary": 54000,
"department": "IT Manager"
}
]
DELETE /api/Employees/{{id}}
200 OK
[
{
"id": "6653b0b4-3e63-4b47-82ab-9b497cab01b9",
"name": "John Doe",
"email": "john@abc.com",
"phone": 9876543210,
"salary": 54000,
"department": "IT Manager"
}
]
If any of the API does not have a matching record present in the Database to perform the respective operations, then the API returns 404 Not Found as response
GET /api/Employees/{{id}}
PUT /api/Employees/{{id}}
DELETE /api/Employees/{{id}}
404 Not Found
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
"title": "Not Found",
"status": 404,
"traceId": "00-049191ed4040ae3b5fcb8cbb09908cc7-d69eb9f86a77c0f0-00"
}