Skip to main content
net11.0

Components for performing health checks using EntityFrameworkCore. This package was built from the source code at https://github.com/dotnet/dotnet/tree/820230c386db5b0106c5430b3e5aee92a7826bf5

Published
Oct 13, 2026
5d ago
Total Downloads
149.1M
149,134,943

Install

dotnet add package Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore --version 11.0.0-rc.2.26504.105
ProductVersions
.NET
net11.0

README

About

Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore provides components for performing health checks using Entity Framework Core (EF Core).

How to Use

To use Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore, follow these steps:

Installation

dotnet add package Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore

Configuration

To add a health check for an EF Core DbContext, use the AddDbContextCheck extension method to configure it with your app's service provider. Here's an example:

builder.Services.AddDbContext<SampleDbContext>(options =>
    options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));

builder.Services.AddHealthChecks()
    .AddDbContextCheck<SampleDbContext>();

Additional Documentation

For additional documentation and examples, refer to the official documentation on using the Entity Framework Core DbContext probe.

Feedback & Contributing

Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Changes from Previous Version

No structural changes between v11.0.0-rc.1.26425.128 and v11.0.0-rc.2.26504.105.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.