IdentityServiceCollectionExtensions.AddIdentity 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
AddIdentity<TUser,TRole>(IServiceCollection) |
為指定的使用者和角色類型新增預設身分識別系統組態。 |
AddIdentity<TUser,TRole>(IServiceCollection, Action<IdentityOptions>) | |
AddIdentity<TUser,TRole>(IServiceCollection, Action<IdentityOptions>) |
為指定的使用者和角色類型新增和設定身分識別系統。 |
AddIdentity<TUser,TRole>(IServiceCollection)
為指定的使用者和角色類型新增預設身分識別系統組態。
public static Microsoft.AspNetCore.Identity.IdentityBuilder AddIdentity<TUser,TRole> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TUser : class where TRole : class;
static member AddIdentity : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.AspNetCore.Identity.IdentityBuilder (requires 'User : null and 'Role : null)
<Extension()>
Public Function AddIdentity(Of TUser As Class, TRole As Class) (services As IServiceCollection) As IdentityBuilder
類型參數
- TUser
表示系統中使用者的類型。
- TRole
表示系統中角色的類型。
參數
- services
- IServiceCollection
應用程式中可用的服務。
傳回
IdentityBuilder用於建立和設定身分識別系統的 。
適用於
AddIdentity<TUser,TRole>(IServiceCollection, Action<IdentityOptions>)
public static Microsoft.AspNetCore.Identity.IdentityBuilder AddIdentity<TUser,TRole> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Builder.IdentityOptions> setupAction) where TUser : class where TRole : class;
static member AddIdentity : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Builder.IdentityOptions> -> Microsoft.AspNetCore.Identity.IdentityBuilder (requires 'User : null and 'Role : null)
<Extension()>
Public Function AddIdentity(Of TUser As Class, TRole As Class) (services As IServiceCollection, setupAction As Action(Of IdentityOptions)) As IdentityBuilder
類型參數
- TUser
- TRole
參數
- services
- IServiceCollection
- setupAction
- Action<IdentityOptions>
傳回
適用於
AddIdentity<TUser,TRole>(IServiceCollection, Action<IdentityOptions>)
為指定的使用者和角色類型新增和設定身分識別系統。
public static Microsoft.AspNetCore.Identity.IdentityBuilder AddIdentity<TUser,TRole> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Identity.IdentityOptions> setupAction) where TUser : class where TRole : class;
static member AddIdentity : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Identity.IdentityOptions> -> Microsoft.AspNetCore.Identity.IdentityBuilder (requires 'User : null and 'Role : null)
<Extension()>
Public Function AddIdentity(Of TUser As Class, TRole As Class) (services As IServiceCollection, setupAction As Action(Of IdentityOptions)) As IdentityBuilder
類型參數
- TUser
表示系統中使用者的類型。
- TRole
表示系統中角色的類型。
參數
- services
- IServiceCollection
應用程式中可用的服務。
- setupAction
- Action<IdentityOptions>
設定 的 IdentityOptions 動作。
傳回
IdentityBuilder用於建立和設定身分識別系統的 。