Microsoft.AspNetCore.DataProtection.EntityFrameworkCore
                               
                            
                                10.0.0-preview.5.25277.101
                            
                        
                            
                                
                                
                                    Prefix Reserved
                                
                            
                    See the version list below for details.
dotnet add package Microsoft.AspNetCore.DataProtection.EntityFrameworkCore --version 10.0.0-preview.5.25277.101
NuGet\Install-Package Microsoft.AspNetCore.DataProtection.EntityFrameworkCore -Version 10.0.0-preview.5.25277.101
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.0-preview.5.25277.101" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.0-preview.5.25277.101" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" />
paket add Microsoft.AspNetCore.DataProtection.EntityFrameworkCore --version 10.0.0-preview.5.25277.101
#r "nuget: Microsoft.AspNetCore.DataProtection.EntityFrameworkCore, 10.0.0-preview.5.25277.101"
#:package Microsoft.AspNetCore.DataProtection.EntityFrameworkCore@10.0.0-preview.5.25277.101
#addin nuget:?package=Microsoft.AspNetCore.DataProtection.EntityFrameworkCore&version=10.0.0-preview.5.25277.101&prerelease
#tool nuget:?package=Microsoft.AspNetCore.DataProtection.EntityFrameworkCore&version=10.0.0-preview.5.25277.101&prerelease
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 | Versions 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. | 
- 
                                                    
net10.0
- Microsoft.AspNetCore.DataProtection (>= 10.0.0-preview.5.25277.101)
 - Microsoft.EntityFrameworkCore (>= 10.0.0-preview.5.25277.101)
 
 
GitHub repositories (24)
Showing the top 20 popular GitHub repositories that depend on Microsoft.AspNetCore.DataProtection.EntityFrameworkCore:
| Repository | Stars | 
|---|---|
| 
                                                        
                                                            dotnet/AspNetCore.Docs
                                                        
                                                         
                                                            Documentation for ASP.NET Core
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            dodyg/practical-aspnetcore
                                                        
                                                         
                                                            Practical samples of ASP.NET Core 10 RC 2, 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.
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            skoruba/IdentityServer4.Admin
                                                        
                                                         
                                                            The administration for the IdentityServer4 and Asp.Net Core Identity
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            phongnguyend/Practical.CleanArchitecture
                                                        
                                                         
                                                            Full-stack .Net 9 Clean Architecture (Microservices, Modular Monolith, Monolith), Blazor, Angular 20, React 19, Vue 3.5, BFF with YARP, NextJs 15, Domain-Driven Design, CQRS, SOLID, Asp.Net Core Identity Custom Storage, OpenID Connect, EF Core, OpenTelemetry, SignalR, Background Services, Health Checks, Rate Limiting, Clouds (Azure, AWS, GCP), ..
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            Webreaper/Damselfly
                                                        
                                                         
                                                            Damselfly is a server-based Photograph Management app. The goal of Damselfly is to index an extremely large collection of images, and allow easy search and retrieval of those images, using metadata such as the IPTC keyword tags, as well as the folder and file names. Damselfly includes support for object/face detection.
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            GZTimeWalker/GZCTF
                                                        
                                                         
                                                            The GZ::CTF project, an open source CTF platform.
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            bitfoundation/bitplatform
                                                        
                                                         
                                                            Build all of your apps using what you already know and love ❤️
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            neozhu/CleanArchitectureWithBlazorServer
                                                        
                                                         
                                                            This repository is designed to create an enterprise Blazor Server application that follows the principles of Clean Architecture and implements Blazor Clean Architecture best practices for scalability, maintainability, and testability.
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            simpleidserver/SimpleIdServer
                                                        
                                                         
                                                            OpenID,  OAuth 2.0, SCIM2.0, UMA2.0, FAPI, CIBA & OPENBANKING Framework for ASP.NET Core
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            Aguafrommars/TheIdServer
                                                        
                                                         
                                                            OpenID/Connect, OAuth2, WS-Federation and SAML 2.0 server based on Duende IdentityServer and ITFoxtec Identity SAML 2.0 with its admin UI
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            skoruba/Duende.IdentityServer.Admin
                                                        
                                                         
                                                            The administration for the Duende IdentityServer and Asp.Net Core Identity ⚡
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            Reaparr/Reaparr
                                                        
                                                         
                                                            Plex downloader that brings content from any server to yours!
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            axzxs2001/Asp.NetCoreExperiment
                                                        
                                                         
                                                            原来所有项目都移动到**OleVersion**目录下进行保留。新的案例装以.net 5.0为主,一部分对以前案例进行升级,一部分将以前的工作经验总结出来,以供大家参考!
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            netcorepal/netcorepal-cloud-framework
                                                        
                                                         
                                                            一个基于ASP.NET Core实现的整洁领域驱动设计落地战术框架。  A tactical framework for Clean Domain-Driven Design based on ASP.NET Core.
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            NetDevPack/Security.Jwt
                                                        
                                                         
                                                            Jwt Manager. Set of components to deal with Jwt Stuff. Automate your key rotating, add support for jwks_uri. Store your cryptography keys in a secure place.
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            TheUltimateC0der/listrr
                                                        
                                                         
                                                            listrr.pro creates and maintains lists on trakt.tv completely automated based on your filters.
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            carlreid/StreamMaster
                                                        
                                                         
                                                            A powerful M3U proxy and stream management platform for Plex DVR, Emby, Jellyfin Live TV (and more)
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            RaythaHQ/raytha
                                                        
                                                         
                                                            Raytha is a powerful CMS with an easy-to-use interface and fast performance. It offers custom content types, a template engine, and various access controls. It supports multiple storage providers and an automatically generated REST API. Upgrade your development workflow with Raytha.
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            servicetitan/Stl.Fusion.Samples
                                                        
                                                         
                                                            A collection of samples for Fusion library: https://github.com/servicetitan/Stl.Fusion
                                                         
                                                     | 
                                                    |
| 
                                                        
                                                            FritzAndFriends/TagzApp
                                                        
                                                         
                                                            An application that discovers content on social media for hashtags
                                                         
                                                     | 
                                                    
| Version | Downloads | Last Updated | 
|---|---|---|
| 10.0.0-rc.2.25466.103 | 0 | 9/22/2025 | 
| 10.0.0-rc.1.25451.107 | 0 | 9/22/2025 | 
| 10.0.0-rc.1.25421.113 | 0 | 8/28/2025 | 
| 10.0.0-preview.7.25380.108 | 0 | 8/11/2025 | 
| 10.0.0-preview.7.25380.105 | 0 | 8/6/2025 | 
| 10.0.0-preview.6.25358.103 | 0 | 7/17/2025 | 
| 10.0.0-preview.6.25321.102 | 0 | 6/25/2025 | 
| 10.0.0-preview.5.25280.105 | 0 | 6/2/2025 | 
| 10.0.0-preview.5.25277.114 | 0 | 6/3/2025 | 
| 10.0.0-preview.5.25277.101 | 0 | 5/29/2025 | 
| 10.0.0-preview.5.25266.103 | 0 | 5/20/2025 | 
| 10.0.0-preview.4.25255.103 | 0 | 5/12/2025 | 
| 9.0.10 | 0 | 9/25/2025 | 
| 9.0.7 | 0 | 7/11/2025 | 
| 3.0.0-preview-19075-0444 | 2 | 1/28/2019 | 
| 3.0.0-preview-18579-0056 | 0 | 11/30/2018 | 
| 3.0.0-preview-18579-0053 | 1 | 11/30/2018 |