UserManager<TUser>.AddClaimAsync Method
Add a user claim
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Syntax
'Declaration
Public Overridable Function AddClaimAsync ( _
userId As String, _
claim As Claim _
) As Task(Of IdentityResult)
'Usage
Dim instance As UserManager
Dim userId As String
Dim claim As Claim
Dim returnValue As Task(Of IdentityResult)
returnValue = instance.AddClaimAsync(userId, _
claim)
public virtual Task<IdentityResult> AddClaimAsync(
string userId,
Claim claim
)
public:
virtual Task<IdentityResult^>^ AddClaimAsync(
String^ userId,
Claim^ claim
)
abstract AddClaimAsync :
userId:string *
claim:Claim -> Task<IdentityResult>
override AddClaimAsync :
userId:string *
claim:Claim -> Task<IdentityResult>
public function AddClaimAsync(
userId : String,
claim : Claim
) : Task<IdentityResult>
Parameters
- userId
Type: System.String
- claim
Type: Claim
Return Value
Type: System.Threading.Tasks.Task<IdentityResult>