You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/tutorials/razor-pages/da1.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,8 @@ uid: tutorials/razor-pages/da1
14
14
15
15
The scaffolded movie app is a good start, but the presentation isn't ideal. **ReleaseDate** should be two words, **Release Date**.
16
16
17
-

17
+
:::image type="content" source="~/tutorials/razor-pages/sql/media/seed-data-in-app.png" alt-text="Movie application open in Chrome.":::
18
+
18
19
19
20
## Update the model
20
21
@@ -32,7 +33,7 @@ In the previous code:
32
33
33
34
Browse to *Pages/Movies* and hover over an **Edit** link to see the target URL.
34
35
35
-

36
+
:::image type="content" source="~/tutorials/razor-pages/da1/media/edit-movie.png" alt-text="Browser window with mouse over the Edit link and a link Url of https://localhost:1234/Movies/Edit/5 is shown.":::
36
37
37
38
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.
> You might not be able to enter decimal commas in the `Price` field. To support [jQuery validation](https://jqueryvalidation.org/) for non-English locales that use a comma (",") for a decimal point and for non US-English date formats, the app must be globalized. For globalization instructions, see [this GitHub issue](https://github.com/dotnet/AspNetCore.Docs/issues/4076#issuecomment-326590420).

167
+
:::image type="content" source="~/tutorials/razor-pages/page/media/tag-helpers-vs2026.png" alt-text="Visual Studio view of Create.cshtml page showing Tag Helper highlighting.":::
:::image type="content" source="~/tutorials/razor-pages/razor-pages-start/media/solution-explorer-project.png" alt-text="Solution Explorer showing the RazorPagesMovie project structure.":::
60
60
61
61
For alternative approaches to create the project, see [Create a new project in Visual Studio](/visualstudio/ide/create-new-project).
62
62
@@ -91,13 +91,13 @@ Select **RazorPagesMovie** in **Solution Explorer**, and then press <kbd>Ctrl</k
91
91
92
92
Visual Studio displays the following dialog when a project isn't yet configured to use SSL:
93
93
94
-

94
+
:::image type="content" source="~/static/trustCertVS22.png" alt-text="This project is configured to use SSL. To avoid SSL warnings in the browser you can choose to trust the self-signed certificate that IIS Express has generated. Would you like to trust the IIS Express SSL certificate?":::
95
95
96
96
Select **Yes** if you trust the IIS Express SSL certificate.
Copy file name to clipboardExpand all lines: aspnetcore/tutorials/razor-pages/search.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ The `s => s.Title.Contains()` code is a [Lambda Expression](/dotnet/csharp/progr
54
54
55
55
Navigate to the Movies page and append a query string such as `?searchString=Ghost` to the URL. For example, `https://localhost:7247/Movies?searchString=Ghost`. The filtered movies are displayed.
:::image type="content" source="~/tutorials/razor-pages/search/media/search-string-ghost.png" alt-text="Index view with the search string ghost in the URL and a returned movie list.":::
58
58
59
59
If you add the following route template to the Index page, you can pass the search string as a URL segment. For example, `https://localhost:7247/Movies/Ghost`.
60
60
@@ -64,7 +64,7 @@ If you add the following route template to the Index page, you can pass the sear
64
64
65
65
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.
66
66
67
-

67
+
:::image type="content" source="~/tutorials/razor-pages/search/media/ghost-title-route-data.png" alt-text="Index view with the word ghost added to the Url and a returned movie list of two movies, Ghostbusters and Ghostbusters 2.":::
68
68
69
69
The ASP.NET Core runtime uses [model binding](xref:mvc/models/model-binding) to set the value of the `SearchString` property from the query string (`?searchString=Ghost`) or route data (`https://localhost:7247/Movies/Ghost`). Model binding isn't case sensitive.
70
70
@@ -81,7 +81,7 @@ The HTML `<form>` tag uses the following [Tag Helpers](xref:mvc/views/tag-helper
81
81
82
82
Save your changes and test the filter.
83
83
84
-

84
+
:::image type="content" source="~/tutorials/razor-pages/search/media/filter-by-title.png" alt-text="Index view with the word ghost typed into the Title filter textbox.":::
85
85
86
86
## Search by genre
87
87
@@ -105,7 +105,7 @@ Update the `Index.cshtml` [`<form>` element](https://developer.mozilla.org/docs/
105
105
106
106
Test the app by searching by genre, by movie title, and by both:
107
107
108
-

108
+
:::image type="content" source="~/tutorials/razor-pages/search/media/filter-by-genre-title.png" alt-text="Index view complete with Genre selector and Title textbox search filters.":::
:::image type="content" source="~/tutorials/razor-pages/sql/media/sql-server-object-explorer-vs2026.png" alt-text="View menu showing SQL Server Object Explorer option.":::
55
55
56
56
1. Right-click on the `Movie` table and select **View Designer**:
57
57
58
-

58
+
:::image type="content" source="~/tutorials/razor-pages/sql/media/view-designer-vs2026.png" alt-text="Contextual menus open on Movie table.":::
59
59
60
-

60
+
:::image type="content" source="~/tutorials/razor-pages/sql/media/movie-table-in-designer-vs2026.png" alt-text="Movie tables open in Designer.":::
61
61
62
62
Note the key icon next to `ID`. By default, EF creates a property named `ID` for the primary key.
63
63
64
64
1. Right-click on the `Movie` table and select **View Data**:
65
65
66
-

66
+
:::image type="content" source="~/tutorials/razor-pages/sql/media/view-movie-data-vs2026.png" alt-text="Movie table open showing table data.":::
67
67
68
68
# [Visual Studio Code](#tab/visual-studio-code)
69
69
70
70
## SQLite
71
71
72
72
The [SQLite](https://www.sqlite.org/) website states:
73
73
74
-
> SQLite is a self-contained, high-reliability, embedded, full-featured, public-domain, Azure SQL Database engine. SQLite is the most used database engine in the world.
74
+
> SQLite is a self-contained, high-reliability, embedded, full-featured, public-domain, SQL Database engine. SQLite is the most used database engine in the world.
75
75
76
76
You can download many third-party tools to manage and view a SQLite database. The following image is from [DB Browser for SQLite](https://sqlitebrowser.org/). If you have a favorite SQLite tool, leave a comment on what you like about it.
77
77
78
-

78
+
:::image type="content" source="~/tutorials/first-mvc-app-xplat/working-with-sql/_static/dbb.png" alt-text="DB Browser for SQLite showing movie database.":::
79
79
80
80
> [!NOTE]
81
81
> For this tutorial, use the Entity Framework Core *migrations* feature where possible. Migrations updates the database schema to match changes in the data model. However, migrations can only make changes that the EF Core provider supports, and the SQLite provider's capabilities are limited. For example, adding a column is supported, but removing or changing a column isn't supported. If you create a migration to remove or change a column, the `ef migrations add` command succeeds but the `ef database update` command fails. Due to these limitations, this tutorial doesn't use migrations for SQLite schema changes. Instead, when the schema changes, the database is dropped and re-created.
@@ -144,7 +144,7 @@ Delete all the records in the database so the seed method runs. Stop and start t
144
144
145
145
The app shows the seeded data:
146
146
147
-

147
+
:::image type="content" source="~/tutorials/razor-pages/sql/media/seed-data-in-app.png" alt-text="Movie application open in browser showing movie data.":::
0 commit comments