- C#
- ASP.NET Core
- Razor
- MySQL
- Entity
- Identity Authentication
- EF Core
- CSS
- Bootstrap
- Markdown
This is a C#/ASP.NET Core application that allows a bakery owner named Pierre to keep track of their various treats and the many flavors that those treats might contain. It is an MVC application that allows the user to add, edit, delete, and view the details of both the treats and the flavors. It also allows the user to add flavors to a treat and/or treats to a particular flavor.
- .NET 5 SDK
- A text editor like VS Code
- A browser like Chrome or Firefox
- MySQL Workbench
- Clone the repository:
$ git clone https://github.com/tprussell19/SweetAndSavory.Solution
- Navigate to the
SweetAndSavory.Solution/
directory on your computer - Open with your preferred text editor to view the code base
- Create a database using SQL via Entity:
- Navigate to
SweetAndSavory.Solution/SweetAndSavory
in your command line - Create a file named
appsettings.json
and paste the following code:Note: Be sure to change{ "ConnectionStrings": { "DefaultConnection": "Server=localhost;Port=3306;database=thomas_russell;uid=root;pwd=[YOUR-PASSWORD-GOES-HERE];" } }
[YOUR-PASSWORD-GOES-HERE]
to your actual MySQL password. - Run the command
dotnet ef migrations add Initial
. (If this command throws an error, you might have to run the commanddotnet tool install --global dotnet-ef
first.) - Once the migration has been added, run the command
dotnet ef database update
to setup your database.
- Navigate to
- To run the app:
- Navigate to
SweetAndSavory.Solution/SweetAndSavory
in your command line - Run the command
dotnet restore
to restore the dependencies that are listed in the .csproj - Run the commmand
dotnet build
to build the project and its dependencies into a set of binaries - Finally, run the command
dotnet run
to run the project! - Note:
dotnet run
also restores and builds the project, so you can use this single command to start the app and launch - If the application does not automatically launch in your browser, you will need to open a browser window and navigate to "localhost:5000"
- Navigate to
- No known bugs
MIT © Thomas Russell 2021
Thomas Russell t.p.russell19@gmail.com