Pierre's Treats

By: Noah Atkinson

Technologies Used

  • C#
  • Razor HTML
  • VS Code
  • .Net 6
  • MySQL
  • Entity Framework Core 6
  • CSS

Description

A user authenticated MVC website for managing a bakery's treats and assigning flavors in a many-to-many relationship.

Setup Instructions

You Will Need:

Preliminary Project Set-up:

  1. Clone or download this repository to your machine.
  2. Navigate to the local directory (YourPath/PierresTreats-main/PierresTreats) and create a new file "appsettings.json".
  3. Open the file in VS Code and add:
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost;Port=3306;database=[YOUR-DB-NAME];uid=[YOUR-USER-HERE];pwd=[YOUR-PASSWORD-HERE];"
  }
}

IMPORTANT: Be sure to replace your username, password, and name of your database for the fields [YOUR-USER-HERE], [YOUR-PASSWORD-HERE], AND [YOUR-DB-NAME].

  1. Create a .gitignore file and add "appsettings.json", "bin", and "obj" to the ignored file list.
  2. Open your shell (e.g., Terminal or GitBash) and add your .gitignore file and commit it before adding any other files.
  3. Navigate to this project's production directory called "PierresTreats".
  4. In the command line, run these commands in order
  • $ dotnet tool install --global dotnet-ef --version 6.0.0
  • $ dotnet ef migrations add Initial
  • $ dotnet ef migrations add AddItemsPriority
  • $ dotnet ef database update (- Run this command anytime changes are made to the database -)
  1. Then, run the command dotnet run to compile and execute the console application. Optionally, you can run dotnet build to compile this console app without running it.
  2. Run dotnet watch run in the command line to start the project in development mode with a watcher.
  3. Open the browser to https://localhost:5001. If you cannot access localhost:5001 it is likely because you have not configured a .NET developer security certificate for HTTPS. To learn about this, review this lesson: Redirecting to HTTPS and Issuing a Security Certificate.

Known Bugs

  • None

License

If you have any issues or have questions, ideas or concerns please contact me at noahatkinson1.1@gmail.com

MIT License

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) 2023 Noah Atkinson