ThreeAmigosStaff is a sample application built using ASP.NET Core and Entity Framework Core utilising dependancy injection.
The construction of this project:
├── Services
│ ├── Customer
│ │ ├── CustomerDto.cs
│ │ ├── CustomerService.cs
│ │ ├── Data
│ │ │ └── customerContext.cs
│ │ ├── FakeCustomerService.cs
│ │ └── ICustomerService.cs
│ ├── Order
│ │ ├── FakeOrderService.cs
│ │ ├── IOrderService.cs
│ │ ├── OrderDto.cs
│ │ └── OrderService.cs
│ ├── Product
│ │ ├── FakeProductService.cs
│ │ ├── IProductService.cs
│ │ ├── ProductDto.cs
│ │ ├── ProductHistoryDto.cs
│ │ ├── ProductService.cs
│ │ └── ReviewDto.cs
│ ├── Purchase
│ │ ├── FakePurchaseService.cs
│ │ ├── IPurchaseService.cs
│ │ ├── PurchaseDto.cs
│ │ └── PurchaseService.cs
│ ├── Review
│ │ ├── FakeReviewService.cs
│ │ ├── IReviewService.cs
│ │ ├── ReviewDto.cs
│ │ └── ReviewService.cs
│ └── Staff
│ ├── FakeStaffService.cs
│ ├── IStaffService.cs
│ ├── StaffDto.cs
│ └── StaffService.cs
To view the full structure go to structure
Use these instuctions to get the project up and running.
You will need the following tools:
This is a front end application that uses serveral API's which are deployed to azure and exposed on these URL's:
- Third Party Orders API
- Manage Products API
- Customer Accounts API
- Staff Accounts API
- Customer Orders API
Follow these steps to get your development environment setup with live API's:
- Clone the repository
- Traverse to the
ThreeAmigosStaff
directory. - At the root directory, restore required packages by running:
dotnet restore
- Next, build the solution by running:
dotnet build
- Finally, within the
ThreeAmigosStaff
directory, launch the project by running:dotnet run
If you would like to manually run and build the API's, SQL server and and test it with the ThreeAmigosStaff App for whatever reason you can use docker-compose to do so.
- Go to the
ThreeAmigosStaff
directory. - Edit the
docker-compose.yml
file by uncommenting which API you would like to run. - At the root directory, restore required packages by running:
docker-compose up --build
- Check that all the containers are up an running:
docker ps -a
- Check the docker-compose file for the ports that are being exposed. Then go to http://localhost:5100
- Go to the Startup.cs file.
- Add an
!
to the_env.IsDevelopment
to force it to run in production mode: (example)
if (!_env.IsDevelopment())
- At the root directory, restore required packages by running:
dotnet restore
- Next, build the solution by running:
dotnet build
- Finally, within the
ThreeAmigosStaff
directory, launch the project by running:dotnet run
- .NET Core 2.^
- ASP.NET Core 2.^
- Entity Framework Core 2.^
- Docker Compose
- Docker