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

关联的角色。

返回

适用于