Pierre's Sweet and Savory Treats

By Carlos Urquiza

MVC web application for Pierre's Sweet and Savory Treats.

Technologies Used

  • C#
  • MVC
  • Razor View Engine
  • RESTful Routing
  • .NET 5.0
  • Entity Framework
  • Pomelo Entity Framework
  • MySQL Workbench
  • Identity
  • Git

Description

This MVC web application has the following functionality:

  • The application has user authentication. A user can log in and log out. Only logged in users have create, update and delete functionality. All users have read functionality
  • There is a many-to-many relationship between Treats and Flavors. A treat can have many flavors and a flavor can have many treats.
  • The user can navigate to a splash page that lists all treats and flavors. The user can click on an individual treat or flavor and see all the treats/flavors that belong to it.

Setup/Installation Requirements

Before taking the following installation steps, ensure you have C#, .NET, dotnet script and MySql installed on your computer.

  • Clone this repository.
  • Open your terminal.
  • Navigate to the directory (such as your Desktop folder) where you want the cloned repository to be housed.
  • Run git clone https://github.com/webquiza/PierresTreats.Solution.git.
  • Press Enter.

Connect database

  • Connect the database to the project by creating a appsettings.json file inside PierresTreats.Solution/PierresTreats.
  • Within your new appsettings.json file, add the following piece of code. Note that you will need to enter the password you created for your specific MySQL configuration ( remove the [ ] ):
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost;Port=3306;database=carlos_urquiza;uid=root;pwd=[YOUR-PASSWORD-HERE];"
  }
}
  • Navigate to PierresTreats directory.
  • Run dotnet restore to retrieve and install the packages we listed in .csproj.
  • Run dotnet build to build the project.
  • Update the database by running dotnet ef database update (ensure you have MySQL Workbench open).
  • Run dotnet run to start up your local host (http://localhost:5000).

Known Bugs

  • No known bugs.

License

MIT License

Copyright (c) 2021 Carlos Urquiza

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.

Contact Information

Feel free to contact me at webquiza@gmail.com with any questions regarding this webpage.