GithubHelp home page GithubHelp logo

eluckie / hairsalon.solution Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 482 KB

C# and .NET (week 10) Code Review - Database Basics

License: MIT License

C# 40.61% HTML 51.40% CSS 7.98%
csharp dotnet entity-framework-core mvc-framework mysql-workbench

hairsalon.solution's Introduction

Eau Claire's Salon

By E. Luckie ☀️

This MVC application acts as a tool for a salon owner to manage their stylists and salon clients.

Technologies Used

  • C#
  • .NET 7.0
  • EF Core 7.0
  • MySQL Workbench
  • HTML
  • Markdown
  • Git

Description

This application is intended to help a salon owner keep track of all their stylists and salon clients. The owner is able to view a list of all current stylists, see details for each specific stylist, add new stylists to the system, and add new clients to a specific stylist. There is also functionality (in the form of buttons and clickable links) to edit and delete specified clients or stylists.

Paths

/ Home page welcoming user to the salon. Contains links to view or add stylists, and view or add clients

/Stylists Stylists main page showing full list of current stylists and their specialties

/Clients Clients main page showing full list of current clients and their respective stylists

/{Stylists or Clients}/Create A form to add a new client or stylist (depending on which link was clicked)

/Stylists/Details/{id} A page that displays the selected stylist's name, pronouns, specialty, hire date, and any current clients. Includes links to add a new client to this stylist, edit this stylist, delete this stylist, or return back to the full list of stylists or home page

/{Stylists or Clients}/Edit/{id} A form to edit the current client or stylist (depending on which link was clicked). Both forms include links that say Nevermind and take the user back to the respective main pages, and a link instead go back to the main welcome page

/{Stylists or Clients}/Delete/{id} A page confirming you'd like to delete the selected Stylist or Client. Clicking the Take them away button officially deletes them, and re-routes the user back to the respective main pages displaying the full list of stylists or clients. If user clicks the Nevermind link instead of the button, the selected client or stylist is not deleted, and the user is re-routed back to the respective main page

/Clients/Details/{id} A page that displays the selected client's name, pronouns, and stylist. From there, the user is also able to choose to edit or delete the selected client.

Setup/Installation Requirements

Recreating the Database

  1. Clone this repository to your desktop
  2. Open MySQL Workbench and navigate to the Administration tab
  3. Under the Management label, click Data Import/Restore
  4. Under the Import Options tab, select the circle for Import from Self-Contained File and click the small button with two dots after the text box
  5. In the window that pops up, navigate to the root level of this project, titled HairSalon.Solution and select the file titled elizabeth_luckie.sql
  6. Under the Default Target Schema tab, select the New button and create a name for your new database
  7. Verify your database is named properly and click the Start Import button. Once complete, you will receive a confirmation from MySQL
  8. Once your import is complete, navigate to the Schemas tab at the top of the page. Once you click the small refresh icon in the upper right corner, your new database should populate within the list
  • You will be able to click the new database name, and click the tables tab to verify that both the clients and stylists tables were imported properly

Connecting the Database

  1. Return to your computer's terminal application to your newly cloned project
  2. Within the production level of this directory, called HairSalon, create a new file called appsettings.json
  3. Input the following code into your appsettings.json file

{ "ConnectionStrings": { "DefaultConnection": "Server=localhost;Port=3306;database=[YOUR-DB-NAME];uid=[YOUR-USER-HERE];pwd=[YOUR-PASSWORD-HERE];" } }

  • Replace [ YOUR-DB-NAME ] with the name of the database you just imported to MySQL Workbench
  • Replace [ YOUR-USER-HERE ] with your username for MySQL Workbench
  • Replace [ YOUR-PASSWORD-HERE ] with your password for MySQL Workbench
  • Make sure you save all changes you've made to the file
  • If you are planning on pushing your work back to GitHub to a new repository, make sure to commit your .gitignore file first so that your sensitive information is kept private

Viewing the Active Project

  1. In your computer's terminal, navigate to the production level of this directory called HairSalon
  2. In the command line, run the command dotnet watch run to compile and execute the webpage in Development mode
  • This will also run the command dotnet restore to restore all necessary packages for the project. You may also choose to run this command separately before dotnet watch run to manually restore the project
  • Optionally, you can run the command dotnet build to compile the program without running it

Database Schema

screenshot of tables used in database

Known Bugs

  • No known bugs.

Stretch Plans

  • Include forms to search for stylists &/or clients by name. Display list of results
  • Add functionality to add appointments to a client
  • Add functionality to add appointments to a stylist & check to ensure no conflicting appointments
  • Add functionality to track how much stylists are paid for each appointment

License

MIT License

Copyright (c) 2023 Luckie

hairsalon.solution's People

Contributors

eluckie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.