/PierreTreats

An dotnet mvc application with user authentication and a many-to-many relationship between 'treats' and 'flavors.'

Primary LanguageC#

Pierre's Sweet and Savory Shop

By Rosario Ruvalcaba

A C# web application to manage Treats and Flavors for 'Pierre's Treat Shop' using SQL database, Authentication and user Authorization, and a many-to-many relationship.

Technologies Used

  • C#
  • .Net 5.0
  • ASP .Net Core MVC
  • Razor View Engine
  • MySQL Workbench
  • Entity Core Framework
  • Markdown, CSS, Bootstrap, HTML
  • Identity

Description

This project consists of an C# MVC web application that allows 'Pierre' and other users (once authenticated) to manage information on the treats and flavors of his shop. It allows the authenticated users of the fictional shop to add, edit, and delete Treats and Flavors to an SQL Database with the use of Entity Core Framework. Any user, including un-authenticated users have view access. The project was created as a code review for Epicodus following the Authentication and Authorization section of C#.

Setup/Installation Requirements

  • Clone repository from Github and save a copy on own computer. Then on your local copy, navigate to the top level of the directory.

  • If saving repository remotely, make an initial commit pushing ONLY your .gitignore file so sensitive information is not pushed.

  • Ensure you have C# and .NET installed by running the command [dotnet --version] in your terminal. If the response is not a version number, install .NET from Microsoft website.

  • Install MySQL Community Server MySQL Workbench per instruction provided below by Epicodus:

  • Open MySQL Workbench and import the database provided with this project (rosario_ruvalcaba_sweetsavoryshop).

  • Create file called appsettings.json in the main project directory (HairSalon)

    • Open file and add the following: { "ConnectionStrings": { "DefaultConnection": "Server=localhost;Port=3306;database=[DATABASE NAME HERE];uid=[USER ID HERE];pwd=[PASSWORD HERE];" } }
    • Substitute your own information for DATABASE NAME HERE, USER ID HERE, and PASSWORD HERE.
  • Navigate to the Factory directory in the project and run the command [dotnet restore, then dotnet build].

  • While still in the Factory directory, run the command [dotnet run] to run the application using a localhost server.

  • Ensure Identity can work with Entity by running command [dotnet add package Microsoft.AspNetCore.Identity.EntityFrameworkCore -v 5.0.0]

Known Bugs

  • At the moment: user can enter 'blank' or repeat Treats/Flavors as well as the wrong data type, such as letters for a numbers.

  • Styling is currently incomplete and the navigation bar is incomplete

License

MIT License

Copyright (c) August_2022 Rosario Ruvalcaba Harwood