UserStoreBase<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.CreateUserRole 方法

定义

调用 以创建 的新实例 IdentityUserRole<TKey>

protected:
 virtual TUserRole CreateUserRole(TUser user, TRole role);
protected virtual TUserRole CreateUserRole (TUser user, TRole role);
abstract member CreateUserRole : 'User * 'Role -> 'UserRole
override this.CreateUserRole : 'User * 'Role -> 'UserRole
Protected Overridable Function CreateUserRole (user As TUser, role As TRole) As TUserRole

参数

user
TUser

关联的用户。

role
TRole

关联的角色。

返回

TUserRole

适用于