Practice assignment to get experience using ASP.NET Core MVC and Databases to help track movies and actors.
- C#
- .NET 5
- ASP.NET Core MVC
- dotnet script, REPL
- Razor View Engine
- MySQL and MySQL Workbench
- Git
-
Install .NET 5.0 here
-
Clone repository from GitHub to desired location using
git clone https://github.com/louiesch/AMC.Solution
-
In the terminal navigate to and open project directory
cd AMC.Solution
-
Navigate to production folder
cd AMC
-
Create a file in production folder called appsettings.json
touch appsettings.json
-
Add the following code to your .json file
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=3306;database=[YOUR DATABASE];uid=root;pwd=[YOUR PASSWORD];"
}
}
- Make sure that [YOUR DATABASE] and [YOUR PASSWORD] match the database name and password of your local MySql server.
-
Download MySQL and MySQL Workbench to set up a local database
-
Once installed, open MyMql Workbench and open a local server
-
In the Navigator, select the Administration tab and then select Data Import/Restore
-
Under Import Options, select Import From Self-Contained File, and then select the "AMC.sql" file which can be found in AMC.Solution
-
In the Default Schema to be Imported To option, select New
-
Enter a name for your database and select OK
-
Click Start Import to begin database import
-
Navigate to AMC production folder in terminal
cd AMC
-
To download obj and bin files needed for the program to run, while still in AMC folder type into the terminal:
dotnet restore
-
To run the program, while still in production folder AMC type into the terminal:
dotnet run
Note: The server will not open automatically. The user will need to click on the live share link in terminal, or enter 'localhost:5000' URL into browser.
- No known bugs
MIT Copyright (c) 2021 Louie Schoenknecht
Want to get in touch? Send an email to luisesch97@gmail.com