Skip to content

Commit c2c8377

Browse files
Copilotwadepickett
andauthored
Add Prerequisite section linking to database setup tutorial (#36413)
* Initial plan * Add Prerequisite section linking to database setup tutorial Co-authored-by: wadepickett <[email protected]> * Fix YAML front matter ordering - title first per repository guidelines Co-authored-by: wadepickett <[email protected]> * Enhance SQL tutorial with introduction and objectives Added introduction section to SQL database tutorial. * Add introduction to working with SQL tutorial Added an introduction to the SQL database tutorial section. * Update working-with-sql7.md * Fix formatting in working-with-sql3-5.md Remove extra newline before the section on database context. * Update working-with-sql6.md * Add database context section to SQL tutorial Added section on working with the database context. * Enhance SQL tutorial with introduction and objectives Added introduction section to SQL tutorial for ASP.NET Core. * Enhance SQL tutorial with introduction and objectives Added introduction section to SQL database tutorial. * Expand SQL database tutorial with new topics Added additional topics on configuring Entity Framework Core and database management. * Remove conclusion from working with SQL tutorial Removed concluding sentence about understanding basics of databases. * Enhance SQL tutorial with additional database topics Updated tutorial content to include additional topics such as database connection strings, LocalDB usage, and seeding initial data. * Expand SQL database tutorial with new topics Added additional topics on database context configuration and LocalDB usage. * Enhance SQL tutorial with new topics and details Updated tutorial content to include additional topics such as database connection strings, LocalDB usage, and data seeding. * Enhance SQL database tutorial with new topics Updated tutorial content to include additional topics such as database connection strings, LocalDB usage, and seeding initial data. --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: wadepickett <[email protected]> Co-authored-by: Wade Pickett <[email protected]>
1 parent bce9940 commit c2c8377

File tree

5 files changed

+89
-3
lines changed

5 files changed

+89
-3
lines changed

aspnetcore/tutorials/first-mvc-app/working-with-sql.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
title: Part 5, work with a database in an ASP.NET Core MVC app
3+
ai-usage: ai-assisted
34
author: wadepickett
45
description: Part 5 of tutorial series on ASP.NET Core MVC.
6+
monikerRange: '>= aspnetcore-3.1'
57
ms.author: wpickett
6-
ms.date: 03/02/2025
78
ms.custom: sfi-ropc-nochange
8-
monikerRange: '>= aspnetcore-3.1'
9+
ms.date: 12/01/2025
910
uid: tutorials/first-mvc-app/working-with-sql
1011
---
1112

@@ -17,6 +18,23 @@ By [Rick Anderson](https://twitter.com/RickAndMSFT) and [Jon P Smith](https://tw
1718

1819
:::moniker range=">= aspnetcore-9.0"
1920

21+
## Introduction
22+
23+
This part of the tutorial series focuses on working with a SQL database in your ASP.NET Core MVC application.
24+
25+
You’ll learn how to:
26+
27+
- Register and configure the Entity Framework Core database context for your ASP.NET Core MVC app.
28+
- Work with database connection strings for local development.
29+
- Use SQL Server Express LocalDB for development and examine your database and data using SQL Server Object Explorer.
30+
- Seed your database with initial sample data.
31+
32+
## Prerequisite
33+
34+
This tutorial uses a database you set up in the previous step: <xref:tutorials/first-mvc-app/adding-model>.
35+
36+
## Working with the database context
37+
2038
The `MvcMovieContext` object handles the task of connecting to the database and mapping `Movie` objects to database records. The database context is registered with the [Dependency Injection](xref:fundamentals/dependency-injection) container in the `Program.cs` file:
2139

2240
# [Visual Studio](#tab/visual-studio)

aspnetcore/tutorials/first-mvc-app/working-with-sql/includes/working-with-sql3-5.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
:::moniker range=">= aspnetcore-3.1 < aspnetcore-6.0"
22

3+
## Introduction
4+
5+
This part of the tutorial series focuses on working with a SQL database in your ASP.NET Core MVC application.
6+
7+
You’ll learn how to:
8+
9+
- Register and configure the Entity Framework Core database context for your ASP.NET Core MVC app.
10+
- Work with database connection strings for local development.
11+
- Use SQL Server Express LocalDB for development and examine your database and data using SQL Server Object Explorer.
12+
- Seed your database with initial sample data.
13+
14+
## Prerequisite
15+
16+
This tutorial uses a database you set up in the previous step: <xref:tutorials/first-mvc-app/adding-model>.
17+
18+
## Working with the database context
19+
320
The `MvcMovieContext` object handles the task of connecting to the database and mapping `Movie` objects to database records. The database context is registered with the [Dependency Injection](xref:fundamentals/dependency-injection) container in the `ConfigureServices` method in the `Startup.cs` file:
421

522
# [Visual Studio](#tab/visual-studio)

aspnetcore/tutorials/first-mvc-app/working-with-sql/includes/working-with-sql6.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
:::moniker range="= aspnetcore-6.0"
22

3+
## Introduction
4+
5+
This part of the tutorial series focuses on working with a SQL database in your ASP.NET Core MVC application.
6+
7+
You’ll learn how to:
8+
9+
- Register and configure the Entity Framework Core database context for your ASP.NET Core MVC app.
10+
- Work with database connection strings for local development.
11+
- Use SQL Server Express LocalDB for development and examine your database and data using SQL Server Object Explorer.
12+
- Seed your database with initial sample data.
13+
14+
## Prerequisite
15+
16+
This tutorial uses a database you set up in the previous step: <xref:tutorials/first-mvc-app/adding-model>.
17+
18+
## Working with the database context
19+
320
The `MvcMovieContext` object handles the task of connecting to the database and mapping `Movie` objects to database records. The database context is registered with the [Dependency Injection](xref:fundamentals/dependency-injection) container in the `Program.cs` file:
421

522
# [Visual Studio](#tab/visual-studio)

aspnetcore/tutorials/first-mvc-app/working-with-sql/includes/working-with-sql7.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
:::moniker range="= aspnetcore-7.0"
22

3+
## Introduction
4+
5+
This part of the tutorial series focuses on working with a SQL database in your ASP.NET Core MVC application.
6+
7+
You’ll learn how to:
8+
9+
- Register and configure the Entity Framework Core database context for your ASP.NET Core MVC app.
10+
- Work with database connection strings for local development.
11+
- Use SQL Server Express LocalDB for development and examine your database and data using SQL Server Object Explorer.
12+
- Seed your database with initial sample data.
13+
14+
## Prerequisite
15+
16+
This tutorial uses a database you set up in the previous step: <xref:tutorials/first-mvc-app/adding-model>.
17+
18+
## Working with the database context
19+
320
The `MvcMovieContext` object handles the task of connecting to the database and mapping `Movie` objects to database records. The database context is registered with the [Dependency Injection](xref:fundamentals/dependency-injection) container in the `Program.cs` file:
421

522
# [Visual Studio](#tab/visual-studio)

aspnetcore/tutorials/first-mvc-app/working-with-sql/includes/working-with-sql8.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
:::moniker range="= aspnetcore-8.0"
22

3+
## Introduction
4+
5+
This part of the tutorial series focuses on working with a SQL database in your ASP.NET Core MVC application.
6+
7+
You’ll learn how to:
8+
9+
- Register and configure the Entity Framework Core database context for your ASP.NET Core MVC app.
10+
- Work with database connection strings for local development.
11+
- Use SQL Server Express LocalDB for development and examine your database and data using SQL Server Object Explorer.
12+
- Seed your database with initial sample data.
13+
14+
## Prerequisite
15+
16+
This tutorial uses a database you set up in the previous step: <xref:tutorials/first-mvc-app/adding-model>.
17+
18+
## Working with the database context
19+
320
The `MvcMovieContext` object handles the task of connecting to the database and mapping `Movie` objects to database records. The database context is registered with the [Dependency Injection](xref:fundamentals/dependency-injection) container in the `Program.cs` file:
421

522
# [Visual Studio](#tab/visual-studio)
@@ -109,4 +126,4 @@ The app shows the seeded data.
109126
> [Previous: Adding a model](~/tutorials/first-mvc-app/adding-model.md)
110127
> [Next: Adding controller methods and views](~/tutorials/first-mvc-app/controller-methods-views.md)
111128
112-
:::moniker-end
129+
:::moniker-end

0 commit comments

Comments
 (0)