- C#
- .NET 6
- ASP.NET Core MVC
- Entity Framework Core
- Bootstrap
- MySQL
Welcome to Dr.Sillystringz's Factory Management System - a cutting-edge MVC web application designed to elevate the management of engineers, machines, and licenses within your factory. This tool empowers users with the ability to effortlessly add, update, and delete engineers, while also providing the capability to specify the machines each engineer is licensed to repair. The same powerful functionality extends to machine management, creating a seamless and efficient process for overseeing factory operations.
This Project assumes you have MySql Server and Workbench installed if you do not have them installed follow along with these lessons at Learn how to program.
-
Open terminal or command prompt.
-
Clone the repository by running the following command to your desktop:
git clone https://github.com/MonBoza/Factory.Solution.git
-
Open the project in your favorite code editor.
-
Within the production directory
Factory
, create new file calledappsettings.json
-
Make sure appsettings.json is added to the .gitignore file and it is added to the repository before pushing with your personal information.
-
Within
appsettings.json
, put in the following code replacing theuid
and thepwd
values with your own username and password for MySQL.{ "ConnectionStrings": { "DefaultConnection": "Server=localhost;Port=3306;database=monica_barboza;uid=[YOUR-USER-HERE];pwd=[YOUR-PASSWORD-HERE];" } }
-
To download the tools dotnet-ef that will create migrations and update your database run the following commands in your terminal.
dotnet tool install --global dotnet-ef --version 6.0.0
followed by:
dotnet add package Microsoft.EntityFrameworkCore.Design -v 6.0.0
-
To create a data migration for the database, initialize with
dotnet ef migrations add Initial
in your terminal. This should create a Migrations folder in the production subdirectory of your project.
- To add subsequent migrations run the command
dotnet ef migrations add AddExamplePriority
You can name the migration whatever you like, however it is common to start with a verb and use upper camel case.
- Run the following command to update the database.
dotnet ef database update
- If you would like to remove a migration from the database, run
dotnet ef migrations remove
-
Run the command
dotnet watch run
to compile and run the application in development mode with a watcher. Optionally, you can rundotnet build
to compile without running the app. -
Open the browser to https://localhost:5001 to use the application.
- No known bugs
- If you come across any bug contact the author
Email: (mailto:MonBoza@gmail.com)
Copyright (c) February 9, 2024 Monica Barboza