- C#
- .NET
- HTML
- MVC
- SQL Workbench
- Entity Framework
- Identity Framework
- HTML
- CSS
A website for a bakery to show off pastries by type and flavor. Made using C# exploring authentication, authorization, and many-to-many relationships during Week 12 of Epicodus Coding School.
- This program was built using
Microsoft .NET SDK 6.0
, and may not be compatible with other versions.
- Clone this repo.
- Open your terminal (e.g., Terminal or GitBash) and navigate to this project's production directory called "PierresTreats."
- Create an
appsetting.json
file in the production directory ("PierresTreats.") - Within
appsettings.json
, put in the following code, replacing theuid
andpwd
values with your own username and password for MySQL.
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=3306;database=library_catalog;uid=YOUR-USERNAME-HERE;pwd=YOUR-PASSWORD-HERE;"
}
}
- If you'd like to push this cloned project to a public-facing repository, remember to add the appsettings.json file to your .gitignore first.
- Create the project database using the migrations in the production directory. In your shell (e.g., Terminal or GitBash) navigate to the production directory "PierresTreats," and run
dotnet ef database update
. You may need to run this command for each of the branches in this repo if multiple branches have been created.- Optional: to create a migration, run the command
dotnet ef migrations add MigrationName
whereMigrationName
is your custom name for the migration in UpperCamelCase. To learn more about migrations, visit the LHTP lesson Code First Development and Migrations.
- Optional: to create a migration, run the command
- Open the browser to [https://localhost:5001]. If you cannot access localhost:5001 it is likely because you have not configured a .NET developer security certificate for HTTPS. To learn about this, review this lesson: Redirecting to HTTPS and Issuing a Security Certificate.
- If you want to run the project in production mode with a watcher, you can use a command line flag to specify that you want to run the "production" profile.
dotnet watch run --launch-profile "PierresTreats-Production"
- To optionally further build out this project in development mode, start the project with
dotnet watch run
in the production directory "PierresTreats."
- No known issues.
Enjoy the site! If you have questions or suggestions for fixing the code, please contact me!
Copyright (c) 2023 Sarah Andyshak.