@@ -57,63 +57,64 @@ You can also run the samples in Docker (see below).
57
57
58
58
1 . Update ` Startup.cs ` 's ` ConfigureDevelopmentServices ` method as follows:
59
59
60
- ```
61
- public void ConfigureDevelopmentServices(IServiceCollection services)
62
- {
63
- // use in-memory database
64
- //ConfigureTestingServices(services);
60
+ ``` csharp
61
+ public void ConfigureDevelopmentServices (IServiceCollection services )
62
+ {
63
+ // use in-memory database
64
+ // ConfigureTestingServices(services);
65
65
66
- // use real database
67
- ConfigureProductionServices(services);
66
+ // use real database
67
+ ConfigureProductionServices (services );
68
68
69
- }
70
- ```
69
+ }
70
+ ```
71
71
72
72
1 . Ensure your connection strings in `appsettings .json ` point to a local SQL Server instance .
73
73
1 . Ensure the tool EF was already installed . You can find some help [here ](https :// docs.microsoft.com/ef/core/miscellaneous/cli/dotnet)
74
74
75
- ```
76
- dotnet tool install --global dotnet-ef
77
- ```
75
+ ```
76
+ dotnet tool install -- global dotnet - ef
77
+ ```
78
78
79
79
1 . Open a command prompt in the Web folder and execute the following commands :
80
80
81
- ```
82
- dotnet restore
83
- dotnet tool restore
84
- dotnet ef database update -c catalogcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj
85
- dotnet ef database update -c appidentitydbcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj
86
- ```
81
+ ```
82
+ dotnet restore
83
+ dotnet tool restore
84
+ dotnet ef database update - c catalogcontext - p .. / Infrastructure / Infrastructure .csproj - s Web .csproj
85
+ dotnet ef database update - c appidentitydbcontext - p .. / Infrastructure / Infrastructure .csproj - s Web .csproj
86
+ ```
87
87
88
- 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.
88
+ 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 .
89
89
90
90
1 . Run the application .
91
91
92
- 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
[email protected] account.
92
+ 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 .
93
93
94
- Note: If you need to create migrations, you can use these commands:
94
+ Note : If you need to create migrations , you can use these commands :
95
95
96
- ```
97
- -- create migration (from Web folder CLI)
98
- dotnet ef migrations add InitialModel --context catalogcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj -o Data/Migrations
96
+ ```
97
+ -- create migration (from Web folder CLI )
98
+ dotnet ef migrations add InitialModel -- context catalogcontext - p .. / Infrastructure / Infrastructure .csproj - s Web .csproj - o Data / Migrations
99
99
100
- dotnet ef migrations add InitialIdentityModel --context appidentitydbcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj -o Identity/Migrations
101
- ```
100
+ dotnet ef migrations add InitialIdentityModel -- context appidentitydbcontext - p .. / Infrastructure / Infrastructure .csproj - s Web .csproj - o Identity / Migrations
101
+ ```
102
102
103
103
## Running the sample using Docker
104
104
105
105
You can run the Web sample by running these commands from the root folder (where the .sln file is located ):
106
106
107
107
```
108
- docker-compose build
109
- docker-compose up
108
+ docker - compose build
109
+ docker - compose up
110
110
```
111
111
112
112
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 .
113
113
114
114
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 ).
115
115
116
116
## Community Extensions
117
+
117
118
We have some great contributions from the community , and while these aren 't maintained by Microsoft we still want to highlight them.
118
119
119
120
[eShopOnWeb VB .NET ](https :// github.com/VBAndCs/eShopOnWeb_VB.NET) by Mohammad Hamdy Ghanem
0 commit comments