UserStore<TUser>.AddToRoleAsync Method

Add a user to a role

Namespace:  Microsoft.AspNet.Identity.EntityFramework
Assembly:  Microsoft.AspNet.Identity.EntityFramework (in Microsoft.AspNet.Identity.EntityFramework.dll)

Syntax

'Declaration
Public Overridable Function AddToRoleAsync ( _
    user As TUser, _
    role As String _
) As Task
'Usage
Dim instance As UserStore 
Dim user As TUser
Dim role As String 
Dim returnValue As Task 

returnValue = instance.AddToRoleAsync(user, _
    role)
public virtual Task AddToRoleAsync(
    TUser user,
    string role
)
public:
virtual Task^ AddToRoleAsync(
    TUser user, 
    String^ role
)
abstract AddToRoleAsync : 
        user:'TUser * 
        role:string -> Task  
override AddToRoleAsync : 
        user:'TUser * 
        role:string -> Task
public function AddToRoleAsync(
    user : TUser, 
    role : String
) : Task

Parameters

Return Value

Type: System.Threading.Tasks.Task

Implements

IUserRoleStore<TUser>.AddToRoleAsync(TUser, String)

See Also

Reference

UserStore<TUser> Class

Microsoft.AspNet.Identity.EntityFramework Namespace