diff --git a/docs/en/Samples/Microservice-Demo.md b/docs/en/Samples/Microservice-Demo.md index 55a60dca89..4edebfbe03 100644 --- a/docs/en/Samples/Microservice-Demo.md +++ b/docs/en/Samples/Microservice-Demo.md @@ -116,11 +116,29 @@ To be able to run the solution from source code, following tools should be insta * Run `dotnet restore` from the command line inside the `samples\MicroserviceDemo` folder. * Build the solution in Visual Studio. -#### Restore Databases +#### Create Databases -Open `MsDemo_Identity.zip` and `MsDemo_ProductManagement.zip` inside the `samples\MicroserviceDemo\databases` folder and restore to the SQL Server. +MongoDB database is created dynamically, however you need to create database schemas for SQL server databases. The solution is configured to use Entity Core Code First migrations, so you can easily create databases. -> Notice that: These databases have EF Core migrations in the solution, however they don't have seed data, especially required for IdentityServer4 configuration. So, restoring the databases is much more easier. +There are two SQL server databases in this solution. + +##### MsDemo_Identity Database + +* Right click to the `AuthServer.Host` project and click to the `Set as startup project`. +* Open the **Package Manager Console** (Tools -> Nuget Package Manager -> Package Manager Console) +* Select `AuthServer.Host` as the **Default project**. +* Run `Update-Database` command. + +![microservice-sample-update-database-authserver](../images/microservice-sample-update-database-authserver.png) + +##### MsDemo_ProductManagement + +- Right click to the `ProductService.Host` project and click to the `Set as startup project`. +- Open the **Package Manager Console** (Tools -> Nuget Package Manager -> Package Manager Console) +- Select `ProductService.Host` as the **Default project**. +- Run `Update-Database` command. + +![microservice-sample-update-database-products](../images/microservice-sample-update-database-products.png) #### Run Projects @@ -136,6 +154,8 @@ Run the projects with the following order (right click to each project, set as s * BackendAdminApp.Host * PublicWebSite.Host +When you run projects, they will add some initial demo data to their databases. + ## A Brief Overview of the Solution The Visual Studio solution consists of multiple projects each have different roles in the system: diff --git a/docs/en/images/microservice-sample-update-database-authserver.png b/docs/en/images/microservice-sample-update-database-authserver.png new file mode 100644 index 0000000000..689019b587 Binary files /dev/null and b/docs/en/images/microservice-sample-update-database-authserver.png differ diff --git a/docs/en/images/microservice-sample-update-database-products.png b/docs/en/images/microservice-sample-update-database-products.png new file mode 100644 index 0000000000..b49c2a8f8e Binary files /dev/null and b/docs/en/images/microservice-sample-update-database-products.png differ