From 26a43cd4ad7995da892e00e6c1bfe0e0a3734cf5 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Wed, 23 Aug 2017 15:15:54 -0400 Subject: [PATCH] Fixing typo; adding migration creation notes --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a6f8807b0..7beff8830 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ public void ConfigureServices(IServiceCollection services) ``` 1. Ensure your connection strings in `appsettings.json` point to a local SQL Server instance. -1. Open a command prompt in the Web folder and execute the following commands: +2. Open a command prompt in the Web folder and execute the following commands: ``` dotnet restore @@ -76,5 +76,13 @@ dotnet ef database update -c appidentitydbcontext -p ../Infrastructure/Infrastru 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. +3. 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. + +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 + +dotnet ef migrations add InitialIdentityModel --context appidentitydbcontext -p ../Infrastructure/Infrastructure.csproj -s Web.csproj -o Identity/Migrations +```