Skip to content

Commit

Permalink
Merge pull request dotnet#3858 from aspnet/master
Browse files Browse the repository at this point in the history
Update live with current master
  • Loading branch information
tdykstra authored Aug 1, 2017
2 parents 70d483a + fade39c commit ce06971
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
6 changes: 5 additions & 1 deletion aspnetcore/mvc/razor-pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ The associations of URL paths to pages are determined by the page's location in
| */Pages/Index.cshtml* | `/` or `/Index` |
| */Pages/Contact.cshtml* | `/Contact` |
| */Pages/Store/Contact.cshtml* | `/Store/Contact` |
| */Pages/Store/Index.cshtml* | `/Store` or `/Store/Index` |

The runtime looks for Razor Pages files in the *Pages* folder by default.
Notes:

* The runtime looks for Razor Pages files in the *Pages* folder by default.
* `Index` is the default page when a URL doesn't include a page.

<a name="rpvs17"></a>

Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/security/authentication/cookie.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ uid: security/authentication/cookie

<a name=security-authentication-cookie-middleware></a>

ASP.NET Core provides cookie [middleware](../../fundamentals/middleware.md#fundamentals-middleware) which serializes a user principal into an encrypted cookie and then, on subsequent requests, validates the cookie, recreates the principal and assigns it to the `User` property on `HttpContext`. If you want to provide your own login screens and user databases you can use the cookie middleware as a standalone feature.
ASP.NET Core provides cookie [middleware](../../fundamentals/middleware.md#fundamentals-middleware) which serializes a user principal into an encrypted cookie and then, on subsequent requests, validates the cookie, recreates the principal and assigns it to the `User` property on `HttpContext`. If you want to provide your own login screens and user databases, you can use the cookie middleware as a standalone feature.

<a name=security-authentication-cookie-middleware-configuring></a>

Expand Down
14 changes: 14 additions & 0 deletions aspnetcore/tutorials/first-mvc-app/adding-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,24 @@ Add-Migration Initial
Update-Database
```

Note: See the [CLI approach](#cli) if you have problems with the PMC.

The `Add-Migration` command creates code to create the initial database schema. The schema is based on the model specified in the `DbContext`(In the *Data/MvcMovieContext.cs file). The `Initial` argument is used to name the migrations. You can use any name, but by convention you choose a name that describes the migration. See [Introduction to migrations](xref:data/ef-mvc/migrations#introduction-to-migrations) for more information.

The `Update-Database` command runs the `Up` method in the *Migrations/\<time-stamp>_InitialCreate.cs* file, which creates the database.

<a name="cli"></a>
You can perform the preceeding steps using the command-line interface (CLI) rather than the PMC:

* Add [EF Core tooling](xref:data/ef-mvc/migrations#entity-framework-core-nuget-packages-for-migrations) to the *.csproj* file.
* Run the following commands from the console (in the project directory):

```console
dotnet ef migrations add InitialCreate
dotnet ef database update
```


[!INCLUDE[adding-model](../../includes/mvc-intro/adding-model3.md)]

[!code-csharp[Main](../../tutorials/first-mvc-app/start-mvc/sample/MvcMovie/Startup.cs?name=ConfigureServices&highlight=6-7)]
Expand Down

0 comments on commit ce06971

Please sign in to comment.