by Hayeong Pyeon
- C#
- ASP.NET
- MySQL (Community Server, Workbench)
- Entity Framework Core
- HTML Helper Methods, Lambda Expressions, String Interpolation
- ViewBag
- One-to-many Relationship
- MVC
- This application is an independent project as a review of Database Basics chapter of C# course provided by Epicodus.
- As the salon owner (user), you can do the following:
- To see a list of all stylists.
- To select a stylist, see their details, and see a list of all clients that belong to that stylist.
- Add new stylists to the system when hired.
- Add new clients to a specific stylist (failure to assign each client to a stylist will not have them added to the list).
- Make sure you have MySQL Community Server and Workbench installed.
- Clone this repo.
- Open your shell (e.g., Terminal or GitBash) and navigate to this project's production directory named HairSalon.
- Within HairSalon, add the dependencies that are necessary for Entity Framework Core by runniing the following commands:
dotnet add package Microsoft.EntityFrameworkCore -v 6.0.0
dotnet add package Pomelo.EntityFrameworkCore.MySql -v 6.0.0
- Within the same directory, create a new file named
appsettings.json
. In thejson
file, put in the following code, replacing theuid
andpwd
values with your own username and password for MySQL.
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Port=3306;database=hayeong_pyeon;uid=[YOUR-USER-NAME];pwd=[YOUR-PASSWORD];"
}
}
- In the production directory, run
dotnet watch run
in the command line to start the project in development mode with a watcher.
- In the Navigator > Administration window, select Data Import/Restore.
- In Import Options select Import from Self-Contained File.
- Navigate to the file that has been just created.
- Under Default Schema to be Imported To, select the New button.
- Enter
hayeong_pyeon
. - Click Ok.
- Navigate to the tab called Import Progress and click Start Import at the bottom right corner of the window. After you are finished with the above steps, reopen the Navigator > Schemas tab. Right click and select Refresh All to view the created database.
No bug found as of March 10, 2024
MIT | Copyright © 2024 Hayeong Pyeon