Skip to content

C# webpage to manage engineers and machines using MVC and EFCore Migrations

Notifications You must be signed in to change notification settings

emmalgs/Factory.Solution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

Dr.SillyStringz Factory Manager

By Emma Gerigscott

gif of webpage in action

Description

The Doctor needs a webpage to manage all those crazy machines and those loopy engineers. This webpage uses MVC, EF Core Migrations, many-to-many relationships and one-to-many relationships and incorporates CRUD functionality to allow the user to manage the factory database.

Technologies Used

  • C#
  • .NET
  • ASP.NET Core
  • MVC
  • Entity Framework Core
  • Pomelo Entity Framework Core
  • EF Core Migrations
  • Html Helpers
  • MySQL

Database Structure

image of schema connections

Setup Instructions

  1. Clone this repo.
  2. Open your terminal (e.g. Terminal or GitBash) and navigate to this project's directory called "Factory".
  3. Set up the project:
  • Create a file called 'appsettings.json' in Factory.Solution/Factory directory
  • Add the following code to the appsettings.json file:
{
"ConnectionStrings": {
    "DefaultConnection": "Server=localhost;Port=3306;database=factory;uid=[YOUR_SQL_USER_ID];pwd=[YOUR_SQL_PASSWORD];"
  }
}
  • Make sure to plug in your SQL user id and password at [YOUR_SQL_USER_ID] and [YOUR_SQL_PASSWORD]
  1. Set up the database:
  • Make sure EF Core Migrations is installed on your computer by running dotnet tool install --global dotnet-ef --version 6.0.0
  • In the production folder of the project (Factory.Solution/Factory) run:
dotnet ef database update
  • You should see the new schema in your Navigator > Schemas tab of your MySql Workbench on refresh called factory
  1. Running the project in your browser:
  • Navigate to the production directory "Factory" from your terminal.
  • Run the command from Factory dotnet watch run
  • Your browser should automatically open https://localhost:5001/. You may need to enter your computers password when prompted to allow ASP.NET Core to run in your browser.

Known Bugs

  • Engineer and Machine do not need to be in same location

License

MIT
Copyright © 2023 Emma Gerigscott

About

C# webpage to manage engineers and machines using MVC and EFCore Migrations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published