diff --git a/aspnetcore/fundamentals/environments.md b/aspnetcore/fundamentals/environments.md
index 52f94a258a..40b134aa47 100644
--- a/aspnetcore/fundamentals/environments.md
+++ b/aspnetcore/fundamentals/environments.md
@@ -45,9 +45,9 @@ The development environment can enable features that shouldn't be exposed in pro
The environment for local machine development can be set in the *Properties\launchSettings.json* file of the project. Environment values set in *launchSettings.json* override values set in the system environment.
-The following XML shows three profiles from a *launchSettings.json* file:
+The following JSON shows three profiles from a *launchSettings.json* file:
-[!code-xml[Main](environments/sample/WebApp1/Properties/launchSettings.json?highlight=10,11,18,26)]
+[!code-json[Main](environments/sample/WebApp1/Properties/launchSettings.json?highlight=10,11,18,26)]
When the application is launched with `dotnet run`, the first profile with `"commandName": "Project"` will be used. The value of `commandName` specifies the web server to launch. `commandName` can be one of :
@@ -88,7 +88,7 @@ The production environment should be configured to maximize security, performanc
* Client-side resources are bundled, minified, and potentially served from a CDN.
* Diagnostic error pages disabled.
* Friendly error pages enabled.
-* Production logging and monitoring enabled. For example, [Application Insights](https://azure.microsoft.com/documentation/articles/app-insights-asp-net-five/).
+* Production logging and monitoring enabled. For example, [Application Insights](/azure/application-insights/app-insights-asp-net-core).
## Setting the environment
@@ -144,7 +144,7 @@ export ASPNETCORE_ENVIRONMENT=Development
```
Machine level environment variables are set in the *.bashrc* or *.bash_profile* file. Edit the file using any text editor and add the following statment.
-```
+```bash
export ASPNETCORE_ENVIRONMENT=Development
```
diff --git a/aspnetcore/fundamentals/error-handling.md b/aspnetcore/fundamentals/error-handling.md
index d6d18b08fb..73df297fca 100644
--- a/aspnetcore/fundamentals/error-handling.md
+++ b/aspnetcore/fundamentals/error-handling.md
@@ -114,7 +114,7 @@ Hosting can only show an error page for a captured startup error if the error oc
## ASP.NET MVC error handling
-[MVC](../mvc/index.md) apps have some additional options for handling errors, such as configuring exception filters and performing model validation.
+[MVC](xref:mvc/overview) apps have some additional options for handling errors, such as configuring exception filters and performing model validation.
### Exception Filters
diff --git a/aspnetcore/includes/RP/code/Models/Movie.cs b/aspnetcore/includes/RP/code/Models/Movie.cs
index 3b72b3f679..7ea500b2d7 100644
--- a/aspnetcore/includes/RP/code/Models/Movie.cs
+++ b/aspnetcore/includes/RP/code/Models/Movie.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel.DataAnnotations;
namespace RazorPagesMovie.Models
{
@@ -6,6 +7,9 @@ namespace RazorPagesMovie.Models
{
public int ID { get; set; }
public string Title { get; set; }
+
+ [Display(Name = "Release Date")]
+ [DataType(DataType.Date)]
public DateTime ReleaseDate { get; set; }
public string Genre { get; set; }
public decimal Price { get; set; }
diff --git a/aspnetcore/includes/RP/da1.md b/aspnetcore/includes/RP/da1.md
new file mode 100644
index 0000000000..5e55f62a09
--- /dev/null
+++ b/aspnetcore/includes/RP/da1.md
@@ -0,0 +1,13 @@
+# Update the generated pages
+
+By [Rick Anderson](https://twitter.com/RickAndMSFT)
+
+We have a good start to the movie app, but the presentation isn't ideal. We don't want to see the time (12:00:00 AM in the image below) and **ReleaseDate** should be **Release Date** (two words).
+
+![Movie application open in Chrome showing movie data](../../tutorials/razor-pages/sql/_static/m55.png)
+
+## Update the generated code
+
+Open the *Models/Movie.cs* file and add the highlighted lines shown in the following code:
+
+[!code-csharp[Main](code/Models/Movie.cs?highlight=2,11-12)]
diff --git a/aspnetcore/includes/RP/da2.md b/aspnetcore/includes/RP/da2.md
new file mode 100644
index 0000000000..b0329a670b
--- /dev/null
+++ b/aspnetcore/includes/RP/da2.md
@@ -0,0 +1,84 @@
+We'll cover [DataAnnotations](https://docs.microsoft.com/aspnet/mvc/overview/older-versions/mvc-music-store/mvc-music-store-part-6) in the next tutorial. The [Display](https://docs.microsoft.com//aspnet/core/api/microsoft.aspnetcore.mvc.modelbinding.metadata.displaymetadata) attribute specifies what to display for the name of a field (in this case "Release Date" instead of "ReleaseDate"). The [DataType](https://docs.microsoft.com/aspnet/core/api/microsoft.aspnetcore.mvc.dataannotations.internal.datatypeattributeadapter) attribute specifies the type of the data (Date), so the time information stored in the field isn't displayed.
+
+Browse to Pages/Movies and hover over an **Edit** link to see the target URL.
+
+![Browser window with mouse over the Edit link and a link Url of http://localhost:1234/Movies/Edit/5 is shown](../../tutorials/razor-pages/da1/edit7.png)
+
+The **Edit**, **Details**, and **Delete** links are generated by the [Anchor Tag Helper](xref:mvc/views/tag-helpers/builtin-th/anchor-tag-helper)
+in the *Pages/Movies/Index.cshtml* file.
+
+[!code-cshtml[Main](../../tutorials/razor-pages/razor-pages-start/snapshot_sample/RazorPagesMovie/Pages/Movies/Index.cshtml?highlight=16-18&range=32-)]
+
+[Tag Helpers](xref:mvc/views/tag-helpers/intro) enable server-side code to participate in creating and rendering HTML elements in Razor files. In the preceding code, the `AnchorTagHelper` dynamically generates the HTML `href` attribute value from the Razor Page (the route is relative), the `asp-page`, and the route id (`asp-route-id`). See [URL generation for Pages](xref:mvc/razor-pages/index#url-generation-for-pages) for more information.
+
+Use **View Source** from your favorite browser to examine the generated markup. A portion of the generated HTML is shown below:
+
+```html
+
+ Edit |
+ Details |
+ Delete
+ |
+```
+
+The dynamically-generated links pass the movie ID with a query string (for example, `http://localhost:5000/Movies/Details?id=2` ).
+
+Update the Edit, Details, and Delete Razor Pages to use the "{id:int}" route template. Change the page directive for each of these pages from `@page` to `@page "{id:int}"`. Run the app and then view source. The generated HTML adds the ID to the path portion of the URL:
+
+```html
+
+ Edit |
+ Details |
+ Delete
+ |
+```
+
+A request to the page with the "{id:int}" route template that does **not** include the integer will return an HTTP 404 (not found) error. For example, `http://localhost:5000/Movies/Details` will return a 404 error. To make the ID optional, append `?` to the route constraint:
+
+ ```cshtml
+@page "{id:int?}"
+```
+
+### Update concurrency exception handling
+
+Update the `OnPostAsync` method in the *Pages/Movies/Edit.cshtml.cs* file. The following highlighted code shows the changes:
+
+[!code-csharp[Main](../../tutorials/razor-pages/razor-pages-start/snapshot_sample/RazorPagesMovie/Pages/Movies/Edit.cshtml.cs?name=snippet1&highlight=16-23)]
+
+The previous code only detects concurrency exceptions when the first concurrent client deletes the movie, and the second concurrent client posts changes to the movie.
+
+To test the `catch` block:
+
+* Set a breakpoint on `catch (DbUpdateConcurrencyException)`
+* Edit a movie.
+* In another browser window, select the **Delete** link for the same movie, and then delete the movie.
+* In the previous browser window, post changes to the movie.
+
+Production code would generally detect concurrency conflicts when two or more clients concurrently updated a record. See [Handling concurrency conflicts](xref:data/ef-rp/concurrency) for more information.
+
+### Posting and binding review
+
+Examine the *Pages/Movies/Edit.cshtml.cs* file:
+[!code-csharp[Main](../../tutorials/razor-pages/razor-pages-start/snapshot_sample/RazorPagesMovie/Pages/Movies/Edit.cshtml.cs?name=snippet2)]
+
+When an HTTP GET request is made to the Movies/Edit page (for example, `http://localhost:5000/Movies/Edit/2`):
+
+* The `OnGetAsync` method fetches the movie from the database and returns the `Page` method.
+* The `Page` method renders the *Pages/Movies/Edit.cshtml* Razor Page. The *Pages/Movies/Edit.cshtml* file contains the model directive (`@model RazorPagesMovie.Pages.Movies.EditModel`), which makes the movie model available on the page.
+* The Edit form is displayed with the values from the movie.
+
+When the Movies/Edit page is posted:
+
+* The form values on the page are bound to the `Movie` property. The `[BindProperty]` attribute enables [Model binding](xref:mvc/models/model-binding).
+
+ ```csharp
+ [BindProperty]
+ public Movie Movie { get; set; }
+ ```
+
+* If there are errors in the model state (for example, `ReleaseDate` cannot be converted to a date), the form is posted again with the submitted values.
+* If there are no model errors, the movie is saved.
+
+The HTTP GET methods in the Index, Create, and Delete Razor pages follow a similar pattern. The HTTP POST `OnPostAsync` method in the Create Razor Page follows a similar pattern to the `OnPostAsync` method in the Edit Razor Page.
+
+Search is added in the next tutorial.
\ No newline at end of file
diff --git a/aspnetcore/includes/RP/search.md b/aspnetcore/includes/RP/search.md
new file mode 100644
index 0000000000..aa32c376a2
--- /dev/null
+++ b/aspnetcore/includes/RP/search.md
@@ -0,0 +1,96 @@
+# Adding search to a Razor Pages app
+
+By [Rick Anderson](https://twitter.com/RickAndMSFT)
+
+In this document, search capability is added to the Index page that enables searching movies by *genre* or *name*.
+
+Update the Index page's `OnGetAsync` method with the following code:
+
+[!code-cshtml[Main](../../tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie/Pages/_ViewStart.cshtml)]
+
+[!code-csharp[Main](../../tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie/Pages/Movies/Index.cshtml.cs?name=snippet_1stSearch)]
+
+The first line of the `OnGetAsync` method creates a [LINQ](https://docs.microsoft.com/dotnet/csharp/programming-guide/concepts/linq/) query to select the movies:
+
+```csharp
+var movies = from m in _context.Movie
+ select m;
+```
+
+The query is *only* defined at this point, it has **not** been run against the database.
+
+If the `searchString` parameter contains a string, the movies query is modified to filter on the search string:
+
+[!code-csharp[Main](../../tutorials/razor-pages/razor-pages-start/sample/RazorPagesMovie/Pages/Movies/Index.cshtml.cs?name=snippet_SearchNull)]
+
+The `s => s.Title.Contains()` code is a [Lambda Expression](https://docs.microsoft.com/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions). Lambdas are used in method-based [LINQ](https://docs.microsoft.com/dotnet/csharp/programming-guide/concepts/linq/) queries as arguments to standard query operator methods such as the [Where](https://docs.microsoft.com/dotnet/csharp/programming-guide/concepts/linq/query-syntax-and-method-syntax-in-linq) method or `Contains` (used in the preceding code). LINQ queries are not executed when they're defined or when they're modified by calling a method (such as `Where`, `Contains` or `OrderBy`). Rather, query execution is deferred. That means the evaluation of an expression is delayed until its realized value is iterated over or the `ToListAsync` method is called. See [Query Execution](https://docs.microsoft.com/dotnet/framework/data/adonet/ef/language-reference/query-execution) for more information.
+
+**Note:** The [Contains](https://docs.microsoft.com//dotnet/api/system.data.objects.dataclasses.entitycollection-1.contains) method is run on the database, not in the C# code. The case sensitivity on the query depends on the database and the collation. On SQL Server, `Contains` maps to [SQL LIKE](https://docs.microsoft.com/sql/t-sql/language-elements/like-transact-sql), which is case insensitive. In SQLite, with the default collation, it's case sensitive.
+
+Navigate to the Movies page and append a query string such as `?searchString=Ghost` to the URL (for example, `http://localhost:5000/Movies?searchString=Ghost`). The filtered movies are displayed.
+
+![Index view](../../tutorials/razor-pages/search/_static/ghost.png)
+
+If the following route template is added to the Index page, the search string can be passed as a URL segment (for example, `http://localhost:5000/Movies/ghost`).
+
+```cshtml
+@page "{searchString?}"
+```
+
+The preceding route constraint allows searching the title as route data (a URL segment) instead of as a query string value. The `?` in `"{searchString?}"` means this is an optional route parameter.
+
+![Index view with the word ghost added to the Url and a returned movie list of two movies, Ghostbusters and Ghostbusters 2](../../tutorials/razor-pages/search/_static/g2.png)
+
+However, you can't expect users to modify the URL to search for a movie. In this step, UI is added to filter movies. If you added the route constraint `"{searchString?}"`, remove it.
+
+Open the *Pages/Movies/Index.cshtml* file, and add the `