Interactive software that allows a user to search and identify motorcycle parts from a Motorcycle Parts Manual
- Open a command prompt or terminal
- Navigate to the repository folder
- If the
src/Libraries/Db/Db.Infrastructure/Migrations
sub-folder are not empty and the database structure is up to date, skip the following sub-steps:- Check if
dotnet ef --version
returns the version 5.0.0, if not follow the troubleshooting steps. - If the database needs to be reset, delete the folders inside the
src/Libraries/Db/Db.Infrastructure/Migrations
folder and thesrc/Libraries/Db/Db.API/motor.db
andsrc/Libraries/Db/Db.API/auth.db
files - Ensure that you are at the root of the repository
- Run the following commands:
dotnet ef migrations add ManualInitial -p Libraries/Db/Db.Infrastructure -s Libraries/Db/Db.API -o Migrations/Manual -c ManualContext
dotnet ef migrations add IdentityInitial -p Libraries/Db/Db.Infrastructure -s Libraries/Db/Db.API -o Migrations/Identity -c IdentityContext
- Verify that the
src/Libraries/Db/Db.Infrastructure/Migrations
folder now has two subfolders with content - Run the following commands:
dotnet ef database update -p Libraries/Db/Db.API -c ManualContext
dotnet ef database update -p Libraries/Db/Db.API -c IdentityContext
- Run the Db.API project to execute the initial set-up data-seeding process
- Check if
- Open a command prompt or terminal
- Navigate to the repository folder
- Navigate to
src/Libraries/Db/Db.API
- Enter the following commnand into the command prompt:
dotnet dev-certs https -t
- Confirm any popping up prompts
- Navigate to
src/Application/MRI.Application
- Repeat steps 4 and 5
To download the EF tool, run the following command in a terminal: dotnet tool install --global dotnet-ef --version 5.0.0
Run dotnet ef --version
afterwards to make sure the correct tool version is installed.
When working on/testing the front-end application, the database server must be running in the background.
To do so, follow these steps:
- In Visual Studio open View -> Terminal
- Navigate to
src/Libraries/Db/Db.API
- Enter the following command into the terminal:
dotnet run
To terminate the running application, press Ctrl+C
in the terminal.
With the database application running in the background, the MRI.Application can be run using Visual Studio directly.