https://github.com/dometrain/from-zero-to-hero-solid-principles-for-csharp-developers
Code from the course: From Zero to Hero: SOLID Principles for C# Developers
https://github.com/dometrain/from-zero-to-hero-solid-principles-for-csharp-developers
Last synced: 4 months ago
JSON representation
Code from the course: From Zero to Hero: SOLID Principles for C# Developers
- Host: GitHub
- URL: https://github.com/dometrain/from-zero-to-hero-solid-principles-for-csharp-developers
- Owner: Dometrain
- Created: 2024-12-09T11:01:07.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-09T11:12:03.000Z (6 months ago)
- Last Synced: 2024-12-19T01:14:57.172Z (6 months ago)
- Language: C#
- Homepage: https://dometrain.com/course/from-zero-to-hero-solid-principles-for-csharp-developers/
- Size: 48.8 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# From Zero to Hero: SOLID Principles for C# Developers - Course code
This is all the code for my course ["From Zero to Hero: SOLID Principles for C# Developers"](https://dometrain.com/course/from-zero-to-hero-solid-principles-for-csharp-developers/).## Setting up the database
Navigate to the db folder using `cd db`Spin up database using docker:
```bash
docker compose up --build -d
```Note: if you are using an older version of docker compose you may need to use the command `docker-compose up --build -d`.
Run the database migration scripts. This will set up all the database tables and seed the database with some test data.
```bash
dotnet tool restore
dotnet dbup upgrade local.yml -e local.env --ensure
```## Run the API
The example code is split into folders for each chapter of the course. The `final` folder contains the final code with all the modifications made throughout the course. The code requires [.NET 9 SDK (or newer)](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) to run.Each folder is self contained with it's own solution folder so you can open each solution individually.
To run the API navigate to the `Store.Api` folder inside each chapter folder and run `dotnet run`.
You can use the [Swagger UI](http://localhost:5010/swagger/index.html) to use the endpoints, there is also a Postman collection at the root of the project.
Use the `/auth` endpoint to get a token. You can use the following credentials:
- Admin User
- Email: `[email protected]`
- Password: `solidrocks`
- Normal User
- Email: `[email protected]`
- Password: `solidrocks`