liveBook · Manning

LocalDB

As explained in Pro ASP.NET Core 7, Tenth Edition

SQL Server LocalDB is a lightweight deployment mode of Microsoft SQL Server designed for local development and application testing.

LocalDB is a zero-configuration version of SQL Server used for local ASP.NET Core database development. It is installed through SQL Server Express and is Windows-only, so cross-platform ASP.NET Core projects cannot use these examples unchanged. section 1.2.2 section 2.1.3

Set up LocalDB with either Visual Studio or the standalone SQL Server Express installer:

  • Select the ASP.NET and web development workload in Visual Studio, then enable SQL Server Express 2019 LocalDB under Individual components. section 2.1.1
  • Alternatively, install SQL Server Express using the Custom option, create a new SQL Server installation, check LocalDB under Feature Selection, and retain the default instance configuration. section 2.1.3
  • Add Entity Framework Core’s Design and SqlServer packages when an application stores and queries data through LocalDB. section 18.2.1

Installing LocalDB for an ASP.NET Core project

On Windows, install SQL Server Express, select LocalDB and the default instance, then add Microsoft.EntityFrameworkCore.Design and Microsoft.EntityFrameworkCore.SqlServer version 7.0.0 to the WebApp project. section 2.1.3 section 18.2.1

Figure 2.8 Selecting the LocalDB feature

Use the installation figure to locate the LocalDB feature during SQL Server Express setup. section 2.1.3

How Pro ASP.NET Core 7, Tenth Edition covers it

How deep it goes
Defines zero-configuration LocalDB and details installation choices, but does not explain database operations or connection configuration.
Examples
Uses Visual Studio and SQL Server Express installer selections plus .NET CLI commands for SDKs, EF Core packages, and migrations.
What it assumes
Assumes Windows, a code editor, and the .NET SDK; teaches LocalDB installation through Visual Studio or SQL Server Express.
What you can do after
Operate/configure LocalDB on Windows and prepare an ASP.NET Core project to store and query data with Entity Framework Core.
How it connects
Connects LocalDB with SQL Server Express, Entity Framework Core, ASP.NET Core, Visual Studio, and the .NET SDK.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Pro ASP.NET Core 7, Tenth Edition. The section links point to the parts of the book it draws on.