Giter Club home page Giter Club logo

myshop's Introduction

MyShop, a sample project that can help you getting start with ASP.NET Core easier

My Shop Architecture

Getting started

You will need to have .NET Core 3.0 SDK installed. You can use Visual Studio 2019 or Visual Studio Code

For Visual Studio

  1. Open the MyShop.sln, build the solution. Set the MyShop.Backend as the Startup project.

  2. Right click the MyShop.Backend, Choose "Manage User Secrets" . In secrets.json add your connection string, this setting will override the ConnectionString in the appsettings.json

  "ConnectionStrings": {
    "DefaultConnection": "Server=.;Database=MyShop;Trusted_Connection=True;MultipleActiveResultSets=true"
  }
  1. Open the Package Manager Console, In the Package Manager Console windows make sure the MyShop.Backend is selected for Default project. Type Update-Database and press Enter

  2. Right click on the solution, choose properties. In the Startup Project choose Multiple startup projects: MyShop.Backend and MyShop.Frontend

  1. Click F5 to start

For Visual Studio Code

  1. At the root folder type dotnet build to build the MyShop.sln solution

  2. Install Entity Framework Core Tools by run the command below

dotnet tool install --global dotnet-ef --version 3.0.0

  1. Go to the src\MyShop.Backend open the appsettings.json update the connection string, then type dotnet ef database update to run migration. Then type dotnet run to launch the backend

  2. Go to the src\MyShop.Frontend folder and type dotnet run to launch the frontend.

Authentication

All the content: brands, categories, products can be added via swagger ui. The insert/update/delete APIs are required authentication. So you will need to register an account. Then, in the swagger ui click "Authorize", a popup dialog will be showed and in the Scope you need to check on the 'api.myshop'. After authorized you can invoke methods to create brands, categories, projects including upload product thumbnails.

myshop's People

Contributors

thiennn avatar kietpham83 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.