EntityFrameworkCoreDataProtectionExtensions.PersistKeysToDbContext<TContext> 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
配置数据保护系统以将密钥保存到 EntityFrameworkCore 数据存储
public:
generic <typename TContext>
where TContext : Microsoft::EntityFrameworkCore::DbContext, Microsoft::AspNetCore::DataProtection::EntityFrameworkCore::IDataProtectionKeyContext[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ PersistKeysToDbContext(Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ builder);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder PersistKeysToDbContext<TContext> (this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder) where TContext : Microsoft.EntityFrameworkCore.DbContext, Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.IDataProtectionKeyContext;
static member PersistKeysToDbContext : Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext and 'Context :> Microsoft.AspNetCore.DataProtection.EntityFrameworkCore.IDataProtectionKeyContext)
<Extension()>
Public Function PersistKeysToDbContext(Of TContext As {DbContext, IDataProtectionKeyContext}) (builder As IDataProtectionBuilder) As IDataProtectionBuilder
类型参数
- TContext
参数
- builder
- IDataProtectionBuilder
要修改的 IDataProtectionBuilder 实例。
返回
值 builder
。