UserManager<TUser, TKey>.RemoveFromRoleAsync Method

Removes a user from a role.

Namespace:  Microsoft.AspNet.Identity
Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

public virtual Task<IdentityResult> RemoveFromRoleAsync(
	TKey userId,
	string role
)

Parameters

userId
Type: TKey
The user ID.
role
Type: System.String
The role.

Return Value

Type: System.Threading.Tasks.Task<IdentityResult>
The task representing the asynchronous operation.
Show: