Web API Project using .NET Core 3.1 and SPA project using Angular 9
- .NET Core 3.1
- Entity Framework 3.1
- Fluent API
- AutoMapper
- Swagger
- SQL Server
- xUnit
- Moq
- SQLite In-Memory database
- Angular 9
- Ng-Bootstrap
- Ngx-Toastr
- 3 Layers:
- Application layer (API)
- Controllers
- Dtos
- Domain layer
- Models
- Interfaces
- Services
- Infrastructure layer
- Repository Pattern
- Application layer (API)
- SPA
On the series of articles, "Creating an Application from Scratch using .NET Core and Angular", there is the explanation step by step about how this code was implemented:
- Part 1: Creating the initial structure
- Part 2: Implementing the Models and creating the Database with EF Core
- Part 3: Implementing the Service classes and the Repository Pattern
- Part 4: Implementing the API layer
- Part 5: Implementing the SPA
- Part 6: Implementing Unit Tests for the Domain Layer
- Part 7: Implementing Unit Tests for the API layer
- Part 8: Implementing Unit Tests for the Infrastructure Layer
To make the management of the containers, Portainer (https://www.portainer.io/) can be used. Portainer is also a docker image. To Install using these two commands:
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
Portainer can be access on: http://localhost:9000/
The username is admin and the password is admin.
On Portainer, select 'local', and go to 'Containers' menu to see the containers.
To run the containers, access the docker folder (BookStore\docker) in cmd and execute the command:
docker-compose -f bookstore_production.yml up --build
To access the API, go to: http://localhost:5001/swagger/index.html
To connect into the database, open SQL Server Management Studio and in the Server name use 'localhost' and use the same username and password that is in the 'bookstore_production.yml' file (it will take some seconds until the database be created).