UserManager<TUser, TKey>.GetRolesAsync Method
Returns the roles for the user.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Syntax
'Declaration
Public Overridable Function GetRolesAsync ( _
userId As TKey _
) As Task(Of IList(Of String))
'Usage
Dim instance As UserManager
Dim userId As TKey
Dim returnValue As Task(Of IList(Of String))
returnValue = instance.GetRolesAsync(userId)
public virtual Task<IList<string>> GetRolesAsync(
TKey userId
)
public:
virtual Task<IList<String^>^>^ GetRolesAsync(
TKey userId
)
abstract GetRolesAsync :
userId:'TKey -> Task<IList<string>>
override GetRolesAsync :
userId:'TKey -> Task<IList<string>>
public function GetRolesAsync(
userId : TKey
) : Task<IList<String>>
Parameters
- userId
Type: TKey
The user ID.
Return Value
Type: System.Threading.Tasks.Task<IList<String>>
The task representing the asynchronous operation.
See Also
Reference
UserManager<TUser, TKey> Class
Microsoft.AspNet.Identity Namespace