Skip to content

Glossary: ASP.NET Core

AddDbContext

The method that registers a DbContext such as `ShopDb` in the service container, scoped per request. It is usually paired with `UseNpgsql` and a connection string.

Where the book teaches it

Related terms

DbContextLifetimeNpgsql