UserManager<TUser>.RemoveFromRoleAsync Method
Remove a user from a role.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Syntax
'Declaration
Public Overridable Function RemoveFromRoleAsync ( _
userId As String, _
role As String _
) As Task(Of IdentityResult)
'Usage
Dim instance As UserManager
Dim userId As String
Dim role As String
Dim returnValue As Task(Of IdentityResult)
returnValue = instance.RemoveFromRoleAsync(userId, _
role)
public virtual Task<IdentityResult> RemoveFromRoleAsync(
string userId,
string role
)
public:
virtual Task<IdentityResult^>^ RemoveFromRoleAsync(
String^ userId,
String^ role
)
abstract RemoveFromRoleAsync :
userId:string *
role:string -> Task<IdentityResult>
override RemoveFromRoleAsync :
userId:string *
role:string -> Task<IdentityResult>
public function RemoveFromRoleAsync(
userId : String,
role : String
) : Task<IdentityResult>
Parameters
- userId
Type: System.String
- role
Type: System.String
Return Value
Type: System.Threading.Tasks.Task<IdentityResult>