ASP.NET Core .NET 10 REST API with EF Core for the Archety Full Stack learning project.
77
Educational REST API built with ASP.NET Core .NET 10 and Entity Framework Core, designed as the backend of a simple Full Stack application for managing employees and departments.
This project is part of a complete learning path covering:
This image is designed to work together with the following SQL Server container:
archety/sqlserver-emplyees
https://hub.docker.com/repository/docker/archety/sqlserver-emplyees
The database container automatically initializes the CompanyDB database, which contains the following tables:
DepartmentEmployeeThis REST API uses Entity Framework Core to connect to that database and expose CRUD operations.
Angular Frontend
|
| HTTP / JSON
v
ASP.NET Core REST API
|
| Entity Framework Core
v
SQL Server
|
v
CompanyDB
When the containers are started through Docker Compose, the backend connects to SQL Server using the Docker service name:
Server=sqlserver,1433
The REST API provides CRUD operations for:
GET /api/employees
GET /api/employees/{id}
POST /api/employees
PUT /api/employees/{id}
DELETE /api/employees/{id}
GET /api/departments
GET /api/departments/{id}
POST /api/departments
PUT /api/departments/{id}
DELETE /api/departments/{id}
The project demonstrates the practical use of:
DbContextDbSetIncludeSaveChangesAsyncThe main relationship is:
Department
1
|
|
N
Employee
Example Docker Compose configuration:
backend:
image: archety/company-api:latest
ports:
- "8080:8080"
environment:
ASPNETCORE_URLS: "http://+:8080"
ConnectionStrings__CompanyDB: "Server=sqlserver,1433;Database=CompanyDB;User Id=sa;Password=YOUR_PASSWORD;TrustServerCertificate=True;"
depends_on:
- sqlserver
The SQL Server service must be available on the same Docker network.
GET /api/employees
Example response:
{
"id": 1,
"firstName": "Luca",
"lastName": "Rossi",
"employeeRole": "Software Engineer",
"employeeCode": "EMP-001",
"departmentRef": 1,
"departmentName": "Engineering"
}
This image was created mainly for educational purposes.
The goal is to demonstrate, step by step, how to build a real Full Stack application starting from the database and ending with the frontend.
The project shows the full data flow:
Angular
↓
REST API
↓
Controller
↓
DTO
↓
Entity Framework Core
↓
SQL Server
The complete project is explained inside the free Full Stack course available on the Archety YouTube channel:
https://www.youtube.com/playlist?list=PLoZNHBEyxFQF_WPhyI1dBR6H3dBkOUqwO
The course covers:
SQL Server database image used by this project:
https://hub.docker.com/repository/docker/archety/sqlserver-emplyees
This REST API directly depends on the database structure provided by that image.
Archety is a technical education project focused on practical software development, DevOps and modern development technologies.
🌐 Website
https://www.archety.dev
▶️ YouTube Channel
https://www.youtube.com/@archetydev
🎓 Full Stack Course
https://www.youtube.com/playlist?list=PLoZNHBEyxFQF_WPhyI1dBR6H3dBkOUqwO
This project is provided for educational purposes.
You are free to use, study and modify the source code for learning and experimentation.
Please provide appropriate attribution when redistributing substantial portions of the project.
Archety
Software Development, DevOps and Technical Training.
Content type
Image
Digest
sha256:899bd9a9c…
Size
118.2 MB
Last updated
11 days ago
docker pull archety/backend-api-employees