Coder Social home page Coder Social logo

janweek12project.solution's Introduction

Authored by Brian Sturgis

Updated on March 26th, 2021

Detailed Description

This is an MVC web application with user authentication and a many-to-many relationship.

Objectives (as quoted from the assignment)

User Stories

  • The application should have user authentication. A user should be able to log in and log out. Only logged in users should have create, update and delete functionality. All users should be able to have read functionality.
  • There should be a many-to-many relationship between Treats and Flavors. A treat can have many flavors (such as sweet, savory, spicy, or creamy) and a flavor can have many treats. For instance, the "sweet" flavor could include chocolate croissants, cheesecake, and so on.
  • A user should be able to navigate to a splash page that lists all treats and flavors. Users should be able to click on an individual treat or flavor to see all the treats/flavors that belong to it.

GIT HUB

Setup and Installation Requirements

Prior to Installation

  • Confirm you have installed .NET installed - this will provide access to the C# language
  • Below are instructions for the dotnet script REPL:
    • Install dotnet script by running the following terminal command: $ dotnet tool install -g dotnet-script
    • NOTE: If you just installed .NET 5, restart the terminal. (Otherwise, you will not be able to run the following command.)
      • Enter $ dotnet script in your terminal and a prompt will open: >
      • To exit the REPL press: Ctrl +C

Installation

  • Clone the repository with the following git terminal command: $ git clone https://github.com/BrianSturgis/JanWeek12Project.Solution.git
  • Open the project directory in your terminal
  • Navigate to the Factory directory
    • To create obj directories in both production and test projects, run the terminal command: $ dotnet restore
    • NOTE: Do not touch the code in either obj directory.
  • To launch the program, run the terminal command: dotnet run (Ensure you are in the project's root directory, Factory, in your Terminal/CMD before running these commands.)

MySQL Password Protection

  • Create a file in the root directory of the project called "appsettings.json".
  • Where you see "YOUR-PASSWORD-HERE" is where you put the password you created for your MySQL server. Your server name and port might vary depending on your local system. Check MySQL Workbench Connections to determine if the local host and port number match and adjust as needed. see example of file set up below.

appsettings.json

{
  "ConnectionStrings": {
      "DefaultConnection": "Server=localhost;Port=3306;database=[YOUR_DATABASE];uid=root;pwd=[YOUR_PASSWORD];"
  }
}

Setting up a Local Database

  • Download MySQL Server. (Note: If you need additional assistance setting up MySQL, visit their site for further instructions.
  • Download MySQL Workbench.
  • Run dotnet ef migrations add Initial --> If there is an error stating "Unable to resolve project", this means the command wasn't run in the correct directory.
  • Entity creates three files in the Migrations directory.
  • Run the following command: dotnet ef database update.

Support and contact details

email Brian Sturgis @ [email protected]

Technologies Used

  • C#
  • NET
  • VisualStudio Code
  • Git
  • GitHub
  • MSTest
  • coffee
  • .NET 5
  • ASP.NET Core
  • Entity Framework
  • MySQL Workbench 8.0.15

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) 2020 Brian Micheal Sturgis

janweek12project.solution's People

Contributors

briansturgis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.