An mvc application that allows the user to track treat and flavor relationships using authentication with identity
- HTML
- C#
- .Net5
- ASP.Net Core MVC
- ASP.Net Identity
- Razor View Engine
- CSS
- Markdown
- Bootstrap
- HtmlHelper
- SQL
- MySQL
- EntityFrameworkCore
Application that allows baker entrepreneur Pierre owner to keep track of treats and flavors in his bakery. Practice with many to many relationships and authentication with identity. Add, delete, edit, and otherwise control both treats and flavors, and which are connected to which.
- Download .NET 5 here
- You can find the Treat.Solution github repository here
- Click the green code button, and copy the https link
- In your preferred git terminal navigate to the directory you would like to store the project
- Enter: "git clone" followed by the copied https link
- Now that the repository is cloned to your computer, right click on the folder and click open with vs code
- Once in the project, navigate to the
Food
directory within the terminal - Add the following packages in terminal:
dotnet add package Microsoft.EntityFrameworkCore -v 5.0.0
dotnet add package Pomelo.EntityFrameworkCore.MySql -v 5.0.0-alpha.2
dotnet add package Microsoft.EntityFrameworkCore.Proxies -v 5.0.0
dotnet add package Microsoft.AspNetCore.Identity.EntityFrameworkCore -v 5.0.0
dotnet tool install --global dotnet-ef --version 3.0.0
- In terminal, navigate to the
Food
directory - Type
dotnet restore
to install dependencies - Type
dotnet build
to build project - In order to initalize a database you will need to create an appsettings.json file that looks like this*
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=3306;database={YOUR DATABASE NAME HERE};uid={YOUR USER ID HERE};pwd={YOUR PASSWORD HERE};"
}
}
*NOTE: change {YOUR X} with corresponding information
- Once you have the appsettings.json file— to create a database, type:
dotnet ef migrations add initial
- To update the database in MySQL type:
dotnet ef database update
- Initialize localhost:3306 in MySQL Workbench (download here)
- At this point you will now be able to view the project by typing
dotnet run
in the terminal
No known issues
MIT Copyright (c) 2021 Ella Tanttu https://opensource.org/licenses/MIT
Ella Tanttu ellajtanttu@gmail.com