共用方式為


UserStore<TUser,TRole,TContext,TKey>.CreateUserRole 方法

定義

呼叫 以建立 的新實例 IdentityUserRole<TKey>

protected:
 override Microsoft::AspNetCore::Identity::EntityFrameworkCore::IdentityUserRole<TKey> ^ CreateUserRole(TUser user, TRole role);
protected override Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole<TKey> CreateUserRole (TUser user, TRole role);
override this.CreateUserRole : 'User * 'Role -> Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole<'Key (requires 'Key :> IEquatable<'Key>)>
Protected Overrides Function CreateUserRole (user As TUser, role As TRole) As IdentityUserRole(Of TKey)

參數

user
TUser

相關聯的使用者。

role
TRole

相關聯的角色。

傳回

適用於