Microsoft.AspNetCore.DataProtection.EntityFrameworkCore 10.0.12

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Microsoft.AspNetCore.DataProtection.EntityFrameworkCore --version 10.0.12
                    
NuGet\Install-Package Microsoft.AspNetCore.DataProtection.EntityFrameworkCore -Version 10.0.12
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.12" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.12" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.AspNetCore.DataProtection.EntityFrameworkCore --version 10.0.12
                    
#r "nuget: Microsoft.AspNetCore.DataProtection.EntityFrameworkCore, 10.0.12"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Microsoft.AspNetCore.DataProtection.EntityFrameworkCore@10.0.12
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.AspNetCore.DataProtection.EntityFrameworkCore&version=10.0.12
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.AspNetCore.DataProtection.EntityFrameworkCore&version=10.0.12
                    
Install as a Cake Tool

About

Microsoft.AspNetCore.DataProtection.EntityFrameworkCore provides a mechanism for storing data protection keys to a database using Entity Framework Core.

How to Use

To use Microsoft.AspNetCore.DataProtection.EntityFrameworkCore, follow these steps:

Installation

dotnet add package Microsoft.AspNetCore.DataProtection.EntityFrameworkCore

Configuration

To store keys in a database, use the PersistKeysToDbContext extension method. For example:

builder.Services.AddDataProtection()
    .PersistKeysToDbContext<MyDbContext>();

Ensure that your DB context (MyDbContext in the above example) implements IDataProtectionKeyContext. For example:

class MyDbContext : DbContext, IDataProtectionKeyContext
{
    public MyKeysContext(DbContextOptions<MyKeysContext> options)
        : base(options)
    {
    }

    // This maps to the table that stores keys
    public DbSet<DataProtectionKey> DataProtectionKeys { get; set; }
}

Additional Documentation

For additional documentation and examples, refer to the official documentation on the Entity Framework Core key storage provider.

Feedback & Contributing

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

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (149)

Showing the top 5 NuGet packages that depend on Microsoft.AspNetCore.DataProtection.EntityFrameworkCore:

Package Downloads
Hopex.ApplicationServer.SiteModule

Hopex Application site module

ImmediaC.SimpleCms

ASP.NET Core based CMS

TinBasic

Provides basic functionality for a standard application.

Aguacongas.IdentityServer.KeysRotation

TheIdServer signing keys rotation.

TinCore

Provides a simple way to execute common tasks in many solution.

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Microsoft.AspNetCore.DataProtection.EntityFrameworkCore:

Repository Stars
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
Kareadita/Kavita
Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
dodyg/practical-aspnetcore
Practical samples of ASP.NET Core 11, 10, 9, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.
Version Downloads Last Updated
11.0.0-rc.1.26425.128 916 9/8/2026
11.0.0-preview.7.26381.103 4,214 8/11/2026
11.0.0-preview.6.26359.118 2,676 7/14/2026
11.0.0-preview.5.26302.115 2,523 6/9/2026
11.0.0-preview.4.26230.115 879 5/12/2026
10.0.12 308,191 9/8/2026
10.0.11 994,907 8/11/2026
10.0.10 1,473,194 7/14/2026
10.0.9 1,304,036 6/9/2026
10.0.8 1,077,813 5/12/2026
9.0.20 11,492 9/8/2026
9.0.19 27,079 8/11/2026
9.0.18 58,586 7/14/2026
9.0.17 55,696 6/9/2026
9.0.16 53,714 5/12/2026
8.0.31 22,091 9/8/2026
8.0.30 41,432 8/11/2026
8.0.29 60,830 7/14/2026
8.0.28 91,954 6/9/2026
8.0.27 104,848 5/12/2026
Loading failed