UserManager<TUser>.GetRolesAsync(TUser) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a list of role names the specified user
belongs to.
public:
virtual System::Threading::Tasks::Task<System::Collections::Generic::IList<System::String ^> ^> ^ GetRolesAsync(TUser user);
public virtual System.Threading.Tasks.Task<System.Collections.Generic.IList<string>> GetRolesAsync (TUser user);
abstract member GetRolesAsync : 'User -> System.Threading.Tasks.Task<System.Collections.Generic.IList<string>>
override this.GetRolesAsync : 'User -> System.Threading.Tasks.Task<System.Collections.Generic.IList<string>>
Public Overridable Function GetRolesAsync (user As TUser) As Task(Of IList(Of String))
Parameters
- user
- TUser
The user whose role names to retrieve.
Returns
The Task that represents the asynchronous operation, containing a list of role names.