From 3a48dfc99d38755f0f11a84ee7297609b96d00ad Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Mon, 15 Mar 2021 19:11:47 +0200 Subject: [PATCH] Fix list items in README (#518) --- README.md | 57 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index d9c0e82..1751e65 100644 --- a/README.md +++ b/README.md @@ -57,56 +57,56 @@ You can also run the samples in Docker (see below). 1. Update `Startup.cs`'s `ConfigureDevelopmentServices` method as follows: -``` - public void ConfigureDevelopmentServices(IServiceCollection services) - { - // use in-memory database - //ConfigureTestingServices(services); + ```csharp + public void ConfigureDevelopmentServices(IServiceCollection services) + { + // use in-memory database + //ConfigureTestingServices(services); - // use real database - ConfigureProductionServices(services); + // use real database + ConfigureProductionServices(services); - } -``` + } + ``` 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) -``` -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: -``` -dotnet restore -dotnet tool restore -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 restore + dotnet tool restore + 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 + ``` -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. -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) -dotnet ef migrations add InitialModel --context catalogcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj -o Data/Migrations + ``` + -- 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 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 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 up +docker-compose build +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. @@ -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). ## Community Extensions + 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