Fix list items in README (#518)

This commit is contained in:
Youssef Victor
2021-03-15 19:11:47 +02:00
committed by GitHub
parent 1131617fde
commit 3a48dfc99d

View File

@@ -57,56 +57,56 @@ You can also run the samples in Docker (see below).
1. Update `Startup.cs`'s `ConfigureDevelopmentServices` method as follows: 1. Update `Startup.cs`'s `ConfigureDevelopmentServices` method as follows:
``` ```csharp
public void ConfigureDevelopmentServices(IServiceCollection services) public void ConfigureDevelopmentServices(IServiceCollection services)
{ {
// use in-memory database // use in-memory database
//ConfigureTestingServices(services); //ConfigureTestingServices(services);
// use real database // use real database
ConfigureProductionServices(services); ConfigureProductionServices(services);
} }
``` ```
1. Ensure your connection strings in `appsettings.json` point to a local SQL Server instance. 1. Ensure your connection strings in `appsettings.json` point to a local SQL Server instance.
1. Ensure the tool EF was already installed. You can find some help [here](https://docs.microsoft.com/ef/core/miscellaneous/cli/dotnet) 1. Ensure the tool EF was already installed. You can find some help [here](https://docs.microsoft.com/ef/core/miscellaneous/cli/dotnet)
``` ```
dotnet tool install --global dotnet-ef dotnet tool install --global dotnet-ef
``` ```
1. Open a command prompt in the Web folder and execute the following commands: 1. Open a command prompt in the Web folder and execute the following commands:
``` ```
dotnet restore dotnet restore
dotnet tool restore dotnet tool restore
dotnet ef database update -c catalogcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj dotnet ef database update -c catalogcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj
dotnet ef database update -c appidentitydbcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj dotnet ef database update -c appidentitydbcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj
``` ```
These commands will create two separate databases, one for the store's catalog data and shopping cart information, and one for the app's user credentials and identity data. These commands will create two separate databases, one for the store's catalog data and shopping cart information, and one for the app's user credentials and identity data.
1. Run the application. 1. Run the application.
The first time you run the application, it will seed both databases with data such that you should see products in the store, and you should be able to log in using the demouser@microsoft.com account. The first time you run the application, it will seed both databases with data such that you should see products in the store, and you should be able to log in using the demouser@microsoft.com account.
Note: If you need to create migrations, you can use these commands: Note: If you need to create migrations, you can use these commands:
``` ```
-- create migration (from Web folder CLI) -- create migration (from Web folder CLI)
dotnet ef migrations add InitialModel --context catalogcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj -o Data/Migrations dotnet ef migrations add InitialModel --context catalogcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj -o Data/Migrations
dotnet ef migrations add InitialIdentityModel --context appidentitydbcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj -o Identity/Migrations dotnet ef migrations add InitialIdentityModel --context appidentitydbcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj -o Identity/Migrations
``` ```
## Running the sample using Docker ## Running the sample using Docker
You can run the Web sample by running these commands from the root folder (where the .sln file is located): You can run the Web sample by running these commands from the root folder (where the .sln file is located):
``` ```
docker-compose build docker-compose build
docker-compose up docker-compose up
``` ```
You should be able to make requests to localhost:5106 for the Web project, and localhost:5200 for the Public API project once these commands complete. If you have any problems, especially with login, try from a new guest or incognito browser instance. You should be able to make requests to localhost:5106 for the Web project, and localhost:5200 for the Public API project once these commands complete. If you have any problems, especially with login, try from a new guest or incognito browser instance.
@@ -114,6 +114,7 @@ You should be able to make requests to localhost:5106 for the Web project, and l
You can also run the applications by using the instructions located in their `Dockerfile` file in the root of each project. Again, run these commands from the root of the solution (where the .sln file is located). You can also run the applications by using the instructions located in their `Dockerfile` file in the root of each project. Again, run these commands from the root of the solution (where the .sln file is located).
## Community Extensions ## Community Extensions
We have some great contributions from the community, and while these aren't maintained by Microsoft we still want to highlight them. We have some great contributions from the community, and while these aren't maintained by Microsoft we still want to highlight them.
[eShopOnWeb VB.NET](https://github.com/VBAndCs/eShopOnWeb_VB.NET) by Mohammad Hamdy Ghanem [eShopOnWeb VB.NET](https://github.com/VBAndCs/eShopOnWeb_VB.NET) by Mohammad Hamdy Ghanem