liveBook · Manning

SaveChanges

SaveChanges is an Entity Framework Core DbContext method that persists tracked entity changes to the database.

How 3 Manning books explain it

ASP.NET Core in Action, 3e

SaveChanges is an Entity Framework Core database-context method that persists tracked data changes to the configured database.

How it is used
Persists tracked entity changes during create, update, delete, and database-testing workflows.
How deep it goes
Explains change-tracking snapshots and selective updates, while deferring alternative tracking mechanisms and configuration details.
Examples
Uses recipe updates, soft deletion, and test-data persistence with an in-memory SQLite provider.
What you can do after
Apply it via Entity Framework Core to persist tracked changes and verify database writes in tests.

Read how ASP.NET Core in Action, 3e explains SaveChanges →

Building Web APIs with ASP.NET Core

SaveChanges is the Entity Framework Core method that persists tracked entity changes to the database.

How it is used
Persists modifications made to entities tracked during an API action's unit of work.
How deep it goes
Explains retrieval, tracking, modification, change detection, persistence, and disposal, without detailing generated SQL internals.
Examples
Uses a batch rename of Mechanic entities as the concrete modification scenario.
What you can do after
Apply it via Entity Framework Core to persist tracked changes and report the update result from an API action.

Read how Building Web APIs with ASP.NET Core explains SaveChanges →

.NET in Action, Second Edition

SaveChanges is the EF Core DbContext method that persists tracked changes to the database.

How it is used
Persists entities added or changed through a DbContext before later queries read them from the database.
How deep it goes
Explains the save boundary and generated identifiers through a focused in-memory example, without detailing transaction or change-tracking internals.
Examples
Uses a CatalogContext, Book entities, an in-memory database, generated Id values, and an ordered LINQ query.
What you can do after
Apply it via EF Core to persist added entities and verify their generated identifiers with a subsequent query.

Read how .NET in Action, Second Edition explains SaveChanges →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.