Skip to content
forked from thiennn/myshop

A sample of modern ASP.NET Core project

License

Notifications You must be signed in to change notification settings

TanNguyenNet/myshop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A sample of modern ASP.NET Core project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 57.2%
  • TypeScript 21.7%
  • HTML 16.4%
  • CSS 3.2%
  • JavaScript 1.5%