Microsoft.AspNetCore.DataProtection.EntityFrameworkCore 10.0.1

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.

No packages depend on Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.

Version Downloads Last updated
10.0.1 4 12/10/2025
10.0.0 20 11/12/2025
10.0.0-rc.2.25502.107 34 10/15/2025
10.0.0-rc.1.25451.107 37 09/09/2025
10.0.0-preview.7.25380.108 49 08/12/2025
10.0.0-preview.6.25358.103 50 07/15/2025
10.0.0-preview.5.25277.114 46 06/07/2025
10.0.0-preview.4.25258.110 57 05/15/2025
10.0.0-preview.3.25172.1 57 04/11/2025
10.0.0-preview.2.25164.1 62 04/01/2025
10.0.0-preview.1.25120.3 57 04/01/2025
9.0.11 16 11/12/2025
9.0.10 25 10/15/2025
9.0.9 40 09/09/2025
9.0.8 38 08/05/2025
9.0.7 52 07/09/2025
9.0.6 53 06/12/2025
9.0.5 65 05/17/2025
9.0.4 56 04/09/2025
9.0.3 81 03/15/2025
9.0.2 67 02/16/2025
9.0.1 58 04/02/2025
9.0.0 58 11/14/2024
9.0.0-rc.2.24474.3 61 10/15/2024
9.0.0-rc.1.24452.1 65 09/20/2024
9.0.0-preview.7.24406.2 55 08/28/2024
9.0.0-preview.6.24328.4 89 07/21/2024
9.0.0-preview.5.24306.11 86 07/21/2024
9.0.0-preview.4.24267.6 80 07/21/2024
9.0.0-preview.3.24172.13 87 07/21/2024
9.0.0-preview.2.24128.4 73 07/21/2024
9.0.0-preview.1.24081.5 82 07/21/2024
8.0.22 16 11/12/2025
8.0.21 32 10/15/2025
8.0.20 43 09/09/2025
8.0.19 35 08/05/2025
8.0.18 55 07/09/2025
8.0.17 45 06/12/2025
8.0.16 65 05/16/2025
8.0.15 61 04/10/2025
8.0.14 65 03/29/2025
8.0.13 66 03/29/2025
8.0.12 59 03/29/2025
8.0.11 61 11/14/2024
8.0.10 68 10/15/2024
8.0.8 91 08/30/2024
8.0.7 91 07/21/2024
8.0.6 125 06/27/2024
8.0.5 88 07/21/2024
8.0.4 96 07/21/2024
8.0.3 93 07/21/2024
8.0.2 83 07/21/2024
8.0.1 110 02/05/2024
8.0.0 88 07/21/2024
8.0.0-rc.2.23480.2 75 07/21/2024
8.0.0-rc.1.23421.29 82 07/21/2024
8.0.0-preview.7.23375.9 87 07/21/2024
8.0.0-preview.6.23329.11 87 07/21/2024
8.0.0-preview.5.23302.2 82 07/21/2024
8.0.0-preview.4.23260.4 86 07/21/2024
8.0.0-preview.3.23177.8 78 07/21/2024
8.0.0-preview.2.23153.2 82 07/21/2024
8.0.0-preview.1.23112.2 77 07/21/2024
7.0.20 88 07/21/2024
7.0.19 83 07/21/2024
7.0.18 87 07/21/2024
7.0.17 88 07/21/2024
7.0.16 88 07/21/2024
7.0.15 86 07/21/2024
7.0.14 85 07/21/2024
7.0.13 91 07/21/2024
7.0.12 89 07/21/2024
7.0.11 77 07/21/2024
7.0.10 93 07/21/2024
7.0.9 95 07/21/2024
7.0.8 77 07/21/2024
7.0.7 75 07/21/2024
7.0.5 88 07/21/2024
7.0.4 88 07/21/2024
7.0.3 91 07/21/2024
7.0.2 91 07/21/2024
7.0.1 77 07/21/2024
7.0.0 88 07/21/2024
7.0.0-rc.2.22476.2 91 07/21/2024
7.0.0-rc.1.22427.2 85 07/21/2024
7.0.0-preview.7.22376.6 69 07/21/2024
7.0.0-preview.6.22330.3 82 07/21/2024
7.0.0-preview.5.22303.8 94 07/21/2024
7.0.0-preview.4.22251.1 104 07/21/2024
7.0.0-preview.3.22178.4 83 07/21/2024
7.0.0-preview.2.22153.2 81 07/21/2024
7.0.0-preview.1.22109.13 95 07/21/2024
6.0.36 58 11/14/2024
6.0.35 61 10/16/2024
6.0.33 75 08/30/2024
6.0.32 99 07/21/2024
6.0.31 87 07/21/2024
6.0.30 86 07/21/2024
6.0.29 93 07/21/2024
6.0.28 83 07/21/2024
6.0.27 84 07/21/2024
6.0.26 91 07/21/2024
6.0.25 102 07/21/2024
6.0.24 91 07/21/2024
6.0.23 95 07/21/2024
6.0.22 87 07/21/2024
6.0.21 95 07/21/2024
6.0.20 95 07/21/2024
6.0.19 93 07/21/2024
6.0.18 77 07/21/2024
6.0.16 86 07/21/2024
6.0.15 93 07/21/2024
6.0.14 91 07/21/2024
6.0.13 82 07/21/2024
6.0.12 73 07/21/2024
6.0.11 90 07/21/2024
6.0.10 61 07/21/2024
6.0.9 103 07/21/2024
6.0.8 87 07/21/2024
6.0.7 88 07/21/2024
6.0.6 87 07/21/2024
6.0.5 85 07/21/2024
6.0.4 102 07/21/2024
6.0.3 93 07/21/2024
6.0.2 90 07/21/2024
6.0.1 85 07/21/2024
6.0.0 69 07/21/2024
6.0.0-rc.2.21480.10 74 07/21/2024
6.0.0-rc.1.21452.15 82 07/21/2024
6.0.0-preview.7.21378.6 90 07/21/2024
6.0.0-preview.6.21355.2 80 07/21/2024
6.0.0-preview.5.21301.17 81 07/21/2024
6.0.0-preview.4.21253.5 71 07/21/2024
6.0.0-preview.3.21201.13 83 07/21/2024
6.0.0-preview.2.21154.6 83 07/21/2024
6.0.0-preview.1.21103.6 77 07/21/2024
5.0.17 75 07/21/2024
5.0.16 79 07/21/2024
5.0.15 84 07/21/2024
5.0.14 87 07/21/2024
5.0.13 101 07/21/2024
5.0.12 85 07/21/2024
5.0.11 83 07/21/2024
5.0.10 88 07/21/2024
5.0.9 88 07/21/2024
5.0.8 92 07/21/2024
5.0.7 90 07/21/2024
5.0.6 86 07/21/2024
5.0.5 102 07/21/2024
5.0.4 90 07/21/2024
5.0.3 80 07/21/2024
5.0.2 87 07/21/2024
5.0.1 92 07/21/2024
5.0.0 93 07/21/2024
5.0.0-rc.2.20475.17 90 07/21/2024
5.0.0-rc.1.20451.17 84 07/21/2024
5.0.0-preview.8.20414.8 79 07/21/2024
5.0.0-preview.7.20365.19 87 07/21/2024
5.0.0-preview.6.20312.15 87 07/21/2024
5.0.0-preview.5.20279.2 87 07/21/2024
5.0.0-preview.4.20257.10 76 07/21/2024
5.0.0-preview.3.20215.14 82 07/21/2024
5.0.0-preview.2.20167.3 71 07/21/2024
5.0.0-preview.1.20124.5 87 07/21/2024
3.1.32 87 07/21/2024
3.1.31 103 07/21/2024
3.1.30 92 07/21/2024
3.1.29 85 07/21/2024
3.1.28 84 07/21/2024
3.1.27 86 07/21/2024
3.1.26 90 07/21/2024
3.1.25 88 07/21/2024
3.1.24 91 07/21/2024
3.1.23 77 07/21/2024
3.1.22 93 07/21/2024
3.1.21 85 07/21/2024
3.1.20 99 07/21/2024
3.1.19 94 07/21/2024
3.1.18 73 07/21/2024
3.1.17 86 07/21/2024
3.1.16 99 07/21/2024
3.1.15 84 07/21/2024
3.1.14 93 07/21/2024
3.1.13 92 07/21/2024
3.1.12 84 07/21/2024
3.1.11 96 07/21/2024
3.1.10 90 07/21/2024
3.1.9 84 07/21/2024
3.1.8 88 07/21/2024
3.1.7 81 07/21/2024
3.1.6 78 07/21/2024
3.1.5 88 07/21/2024
3.1.4 89 07/21/2024
3.1.3 88 07/21/2024
3.1.2 89 07/21/2024
3.1.1 89 07/21/2024
3.1.0 80 07/21/2024
3.1.0-preview3.19555.2 86 07/21/2024
3.1.0-preview2.19528.8 80 07/21/2024
3.1.0-preview1.19508.20 96 07/21/2024
3.0.3 79 07/21/2024
3.0.2 81 07/21/2024
3.0.0 99 07/21/2024
3.0.0-rc1.19457.4 83 07/21/2024
3.0.0-preview9.19424.4 85 07/21/2024
3.0.0-preview8.19405.7 90 07/21/2024
3.0.0-preview7.19365.7 90 07/21/2024
3.0.0-preview6.19307.2 77 07/21/2024
3.0.0-preview5-19227-01 81 07/21/2024
3.0.0-preview4-19216-03 78 07/21/2024
3.0.0-preview3-19153-02 96 07/21/2024
3.0.0-preview-19075-0444 83 07/21/2024
3.0.0-preview-18579-0056 82 07/21/2024
2.2.8 74 07/21/2024
2.2.0 90 07/21/2024
2.2.0-preview3-35497 84 07/21/2024
2.2.0-preview2-35157 88 07/21/2024