9 Going deeper into the DbContext

This chapter covers

  • How EF Core detects changes to an entity
  • Using change tracking to build an audit trail
  • Using raw SQL commands from EF Core
  • Inspecting EF Core’s database model
  • Using EF Core’s database connection resiliency

So far in this book, you’ve seen a wide range of EF Core commands available to you. This chapter digs deeper into the properties and methods available in the application’s DbContext. In some cases, I provide a more detailed explanation of commands in chapter 3, such as the Add, Update, and Delete methods. I also introduce methods that haven’t been covered, such as Attach and TrackGraph, that give you options on how to change the database data.

The EF Core’s DbContext class has a ...

Get Entity Framework Core in Action now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.