Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Removes a user from a role.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
'Declaration
Public Overridable Function RemoveFromRoleAsync ( _
userId As TKey, _
role As String _
) As Task(Of IdentityResult)
'Usage
Dim instance As UserManager
Dim userId As TKey
Dim role As String
Dim returnValue As Task(Of IdentityResult)
returnValue = instance.RemoveFromRoleAsync(userId, _
role)
public virtual Task<IdentityResult> RemoveFromRoleAsync(
TKey userId,
string role
)
public:
virtual Task<IdentityResult^>^ RemoveFromRoleAsync(
TKey userId,
String^ role
)
abstract RemoveFromRoleAsync :
userId:'TKey *
role:string -> Task<IdentityResult>
override RemoveFromRoleAsync :
userId:'TKey *
role:string -> Task<IdentityResult>
public function RemoveFromRoleAsync(
userId : TKey,
role : String
) : Task<IdentityResult>
- userId
Type: TKey
The user ID.
- role
Type: System.String
The role.
Type: System.Threading.Tasks.Task<IdentityResult>
The task representing the asynchronous operation.
UserManager<TUser, TKey> Class