This Epicodus project creates a C# MVC web app (for a fun, fictional factory) that is connected to a database to allow the factory manager to add engineers and machines and manage the relationships between them to track engineer-qualified machine repairs effectively.
- View splash page with a welcome message, lists of all current engineers and machines, and links to view standalone machine and engineer lists
- Select
See all machines
link to view the current list of engineers - Select
Add New Machine
link to add a new machine to the list - Submitting new machine redirects user to the
Machines
index page - Selecting an individual machine shows a list of all engineers who can service the machine
- Selecting
See all engineers
onIndex
orEngineer
page shows all engineers (with clickable detail links) at the factory - Selecting
Add Engineer
link directs user to a form to add an engineer - Submitting new engineer redirects user to
Engineer
index page Machine
index page shows all machines and their designated engineer(s)- Selecting an individual engineer shows a list of all machines serviced by that engineer
- Selecting
Edit Machine
orEdit Engineer
allows user to add new or additional pairings for that machine or engineer - Deleting a machine from an engineer or an engineer from a machine does not delete the anything other than the association between the two
- C#
- ASP.NET Core
- Razor
- MySQL Workbench
- Markdown
- VS Code
- Terminal
- Github
- .NET
- A code editor–we prefer VS Code
- MySQL WorkBench
- Open terminal on your machine
- Clone the repository:
git clone https://github.com/phantomcurve/Factory.Solution.git
- Navigate to the
\Factory
directory - Open with your preferred text editor to view the code
- Navigate to
\Factory
directory in VSCode - Create a file in this directory called
appsettings.json
- In this file add the following:
{ "ConnectionStrings": { "DefaultConnection": "Server=localhost;Port=3306;database=factory;uid=root;pwd=[YOUR PASSWORD HERE & DELETE THESE SQUARE BRACKETS!];" } }
- Make sure you have navigated to the
\Factory
directory - Make sure you have the MySql Workbench application open and that the server is running
- Run
dotnet restore
- Run
dotnet build
- Run
dotnet ef database update
- Start the program with
dotnet run
- Open http://localhost:5000/ in your preferred browser
- Download and install MySQL by selecting
No thanks, just start my download
- Follow along with Installer until reaching
Configuration
page - Select
Use Legacy Password Encryption
- Set password as desired
- Click
Finish
- Open Terminal and enter command
echo 'export PATH="/usr/local/mysql/bin:$PATH"' >> ~/.bash_profile
- Type
source ~/.bash_profile
to verify successful MySQL installation - Download and install MySQL WorkBench
- Open MySQL Workbench and select Administration tab in upper left of navigator window
- Select
Data Import/Restore
- Select
Import from Self-Contained File
- Navigate to Factory.Solution folder and select
tim_roth.sql
- With the
Default Schema to be Imported To
dropdown menu, selectNew
- Name your new schema
factory
and clickok
- Click
Start Import
at bottom right of navigator window
- User can add multiple join relationships between engineers and machines
- Tim Roth timdroth@gmail.com
- MIT License Copyright (C) [2021] [Tim Roth] 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.