UserManager<TUser, TKey>.GetRolesAsync Method (TKey)
Returns the roles for the user.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Syntax
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 Overridable Function GetRolesAsync (
userId As TKey
) As Task(Of IList(Of String))
Parameters
userId
Type: TKeyThe user ID.
Return Value
Type: System.Threading.Tasks.Task<IList<String>>
The task representing the asynchronous operation.
See Also
UserManager<TUser, TKey> Class
Microsoft.AspNet.Identity Namespace
ASP.NET Identity
Return to top