This website allows Pierre to market his sweet and savory treats. The application has user authentication and a many to many relationship.
- 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.
- C#
- .NET
- HTML
- CSS
- SQL Workbench
- Entity Framework
- MVC
This is an MVC application that was built using C#.
This Setup assumes you have GitBash and MySQL Workbench pre-installed.
If you do not have one or both installed, please begin with that setup below.
If you do have both installed, move onto "initial setup".
GitBash and MySQL Workbench Setup
- https://git-scm.com/download/
- Download Git and follow the setup wizard.
- https://dev.mysql.com/downloads/workbench/
- Download MySQL Workbench
- Follow the setup wizard & create a localhost server on port 3306.
- Keep track of your username and password, this will be used in the connection steps of "SQL Workbench Configuration"
Initial Setup
- Copy the git repository url: https://github.com/ftolentino/pierres-treats
- Open a terminal and navigate to your Desktop with cd command
- Run, $ git clone https://github.com/ftolentino/pierres-treats
- In the terminal, navigate into the root directory of the cloned project folder "SweetSavory.Solution".
- Navigate to the projects root directory, "SweetSavory".
- Move onto "SQL Workbench Configuration" instructions below to build the necessary database.
SQL Workbench Configuration
- Create an appsetting.json file in the "Factory" directory
SweetSavory.Solution └── SweetSavory └── appsetting.json
- Insert the following code:
{ "ConnectionStrings": { "DefaultConnection": "Server=localhost;Port=3306;database=filmer_tolentino;uid=root;pwd=[YOUR-PASSWORD-HERE];" } }
*Note: you must include your password in the code block section labeled "YOUR-PASSWORD-HERE".
**Note: you must include your username in the code block section labeled "YOUR-USERNAME-HERE".
***Note: if you plan to push this cloned project to a public-facing repository, remember to add the appsettings.json file to your .gitignore before doing so. - In root directory of project folder "SweetSavory", run $ dotnet ef migrations add restoreDatabase
- Then run $ dotnet ef database update
- Open SQL Workbench.
- Navigate to "filmer_tolentino" schema.
- Click the drop down, select "Tables" drop down.
- Verify the tables, you should see treat, flavor, & flavortreat.
To Run
Navigate to:SweetSavory.Solution └── SweetSavory
Run $ dotnet restore
in the terminal.
Run $ dotnet run
in the terminal.
This program was built using Microsoft .NET SDK 5.0.401
, and may not be compatible with other versions. Cross-version performance is neither implied nor guaranteed, your actual mileage may vary.
- No known issues
None
Copyright (c) 8/5/2022 Filmer Tolentino