UserManager<TUser>.RemoveFromRolesAsync 方法

定义

从命名角色中删除指定的 user

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ RemoveFromRolesAsync(TUser user, System::Collections::Generic::IEnumerable<System::String ^> ^ roles);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> RemoveFromRolesAsync (TUser user, System.Collections.Generic.IEnumerable<string> roles);
abstract member RemoveFromRolesAsync : 'User * seq<string> -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.RemoveFromRolesAsync : 'User * seq<string> -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function RemoveFromRolesAsync (user As TUser, roles As IEnumerable(Of String)) As Task(Of IdentityResult)

参数

user
TUser

要从命名角色中删除的用户。

roles
IEnumerable<String>

要从中删除用户的角色的名称。

返回

表示 Task 异步操作的 ,包含 IdentityResult 操作的 。

适用于