MVC web application to manage their engineers, and the machines they are licensed to fix. The factory manager should be able to add a list of engineers, a list of machines, and specify which engineers are licensed to repair which machines.
- Internet browser
- A code editor such as VSCode to view and edit the code
- .NET or follow along with the Installing .NET instructions to install .NET
- Click on the link to my repository: My Repository
- Click on the green "Code" button and copy the repository URL
- Open your terminal and use the command
git clone REPO URL HEREinto the directory you would like to clone the repository - Open in text editor to view code and make changes
In order to run the application, please install .NET for your computer to recognize the dotnet command.
- Download .NET Core SDK (Software Development Kit). Clicking this link will prompt a file download for your particular OS from Microsoft.
- Open the file. Follow the installation steps.
- Confirm the installation is successful by opening your terminal and running the command
dotnet --version. The response should be something similar to this:5.0.100. This means it was successfully installed.
- Create appsettings.json file in your project and add this code into it: { "ConnectionStrings": { "DefaultConnection": "Server=localhost;Port=3306;database=name_yourdatabase;uid=root;pwd=[PASSWORD];" } }
- Add your appsettings.json file in your .gitignore file to keep your password safe: */appsettings.json
- To create a migration in the root directory of the project, use the command: dotnet ef migrations add Initial
- Apply migration with the command: dotnet ef database update
- To restore database use the command: dotnet ef database restore
MySQL is a type of database software used to create, edit, query, and manage SQL data.
-
For Mac Users please Click Here to download MySQL Installer
-
For Windows Users please Click Here
-
Verify MySQL installation by opening the terminal and entering the command
mysql -uroot -p[THEPASSWORDYOUSELECTED] -
If you gain access you will see see the MYSQL command line!
- Please Click Here to install the correct version for your machine
- Open MySQL Workbench and select
Local instance 3306 server. You will need to enter the password you selected
- Navigate to the TODO folder in the command line
- Use the command
dotnet buildto compile
- Navigate to the TODO folder in the command line
- Use the command
dotnet restore
Expand for Database Installation Essentials!
Create a connection string to connect the database to the web application
- Create a file in the root directory called
appsettings.json - Add the code below:
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=3306;database=name_lastname;uid=root;pwd=[your password];"
}
}
- CHANGE DBNAME
- Put in your MySQL password in
pwd=YourPassword. Change the server, port, and uid if necessary.
- Navigate to TODO directory in terminal
- Use the command
dotnet ef database updateto generate the database through Entity Framework Core
- Write any new code you wish to add to the database. Use the command
dotnet buildto check for any compiling errors. If no errors, proceed to step 2. - To update the database with any changes made to the code, use the command
dotnet ef migrations add [MigrationsName] - Use the command
dotnet ef database updateto update the database
- Open MySQL Workbench
- Click on Server > Data Import in the top navigation bar
- Select
Import from Self-Contained File - Select the
Default Target Schemaor create new schema - Select all Schema Objects you would like to import
- Select
Dump Structure and Data - Click
Start Import
- To view in browser, navigate to TODO folder in the command line
- Use the command
dotnet runto execute the compiled code and start a localhost - In browser navigate to http://localhost:5000
- No known bugs
If any errors or bugs occur with installation, delete both bin and obj folders and follow the Compiling and Installing Packages instructions again. Get help or report a bug you have found in the .NET platform at .NET Support. Or please email me, agatakolohe@gmail.com.
- .NET Core 5.0.1
- ASP.NET Core MVC
- ASP.NET Core Razor Pages
- Bootstrap
- C#
- CSS
- Entity Framework Core
- GitHub
- HTML
- MySQL
- MySQL Workbench
- VS Code
This software is licensed under the MIT License.