Authored by Brian Sturgis
Updated on March 19th, 2021
This is an MVC web application to manage 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. There should be a many-to-many relationship between Engineers and Machines.
- As the factory manager, I need to be able to see a list of all engineers, and I need to be able to see a list of all machines.
- As the factory manager, I need to be able to select a engineer, see their details, and see a list of all machines that engineer is licensed to repair. I also need to be able to select a machine, see its details, and see a list of all engineers licensed to repair it.
- As the factory manager, I need to add new engineers to our system when they are hired. I also need to add new machines to our system when they are installed.
- As the factory manager, I should be able to add new machines even if no engineers are employed. I should also be able to add new engineers even if no machines are installed
- As the factory manager, I need to be able to add or remove machines that a specific engineer is licensed to repair. I also need to be able to modify this relationship from the other side, and add or remove engineers from a specific machine.
- I should be able to navigate to a splash page that lists all engineers and machines. Users should be able to click on an individual engineer or machine to see all the engineers/machines that belong to it.
- repository location (https://github.com/BrianSturgis/JanWeek10Project.solution
- open through a git terminal or clone editor.
- got to repo location.
- using git commands clone to local repo or click "download" and unpack on machine
- Confirm you have installed .NET installed - this will provide access to the C# language
- Below are instructions for the
dotnet script
REPL:- Install
dotnet script
by running the following terminal command:$ dotnet tool install -g dotnet-script
- NOTE: If you just installed .NET 5, restart the terminal. (Otherwise, you will not be able to run the following command.)
- Enter
$ dotnet script
in your terminal and a prompt will open:>
- To exit the REPL press: Ctrl +C
- Enter
- Install
- Clone the repository with the following git terminal command:
$ git clone https://github.com/BrianSturgis/JanWeek10Project.Solution.git
- Open the project directory in your terminal
- Navigate to the
Factory
directory- To create
obj
directories in both production and test projects, run the terminal command:$ dotnet restore
- NOTE: Do not touch the code in either
obj
directory.
- To create
- To launch the program, run the terminal command:
dotnet run
(Ensure you are in the project's root directory, Factory, in your Terminal/CMD before running these commands.)
- Create a file in the root directory of the project called "appsettings.json".
- Where you see "YOUR-PASSWORD-HERE" is where you put the password you created for your MySQL server. Your server name and port might vary depending on your local system. Check MySQL Workbench Connections to determine if the local host and port number match and adjust as needed. see example of file set up below.
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=3306;database=[YOUR_DATABASE];uid=root;pwd=[YOUR_PASSWORD];"
}
}
- Download MySQL Server. (Note: If you need additional assistance setting up MySQL, visit their site for further instructions.
- Download MySQL Workbench.
- Run dotnet ef migrations add Initial --> If there is an error stating "Unable to resolve project", this means the command wasn't run in the correct directory.
- Entity creates three files in the Migrations directory.
- Run the following command: dotnet ef database update.
email Brian Sturgis @ [email protected]
- C#
- NET
- VisualStudio Code
- Git
- GitHub
- MSTest
- coffee
- .NET 5
- ASP.NET Core
- Entity Framework
- MySQL Workbench 8.0.15
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE..
Copyright (c) 2020 Brian Micheal Sturgis