IdentityResult Class

Represents the result of an identity operation.

Namespace
Microsoft.AspNetCore.Identity
Assemblies
  • Microsoft.AspNetCore.Identity

Syntax

public class IdentityResult
class Microsoft.AspNetCore.Identity.IdentityResult

Properties

Microsoft.AspNetCore.Identity.IdentityResult.Errors

An System.Collections.Generic.IEnumerable`1 of Microsoft.AspNetCore.Identity.IdentityErrors containing an errors that occurred during the identity operation.

Return type:System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Identity.IdentityError>
Returns:An System.Collections.Generic.IEnumerable`1 of Microsoft.AspNetCore.Identity.IdentityErrors.
public IEnumerable<IdentityError> Errors { get; }
Microsoft.AspNetCore.Identity.IdentityResult.Succeeded

Flag indicating whether if the operation succeeded or not.

Return type:System.Boolean
Returns:True if the operation succeeded, otherwise false.
public bool Succeeded { get; protected set; }
Microsoft.AspNetCore.Identity.IdentityResult.Success

Returns an Microsoft.AspNetCore.Identity.IdentityResult indicating a successful identity operation.

Return type:Microsoft.AspNetCore.Identity.IdentityResult
Returns:An Microsoft.AspNetCore.Identity.IdentityResult indicating a successful operation.
public static IdentityResult Success { get; }

Methods

Failed(Microsoft.AspNetCore.Identity.IdentityError[])

Creates an Microsoft.AspNetCore.Identity.IdentityResult indicating a failed identity operation, with a list of <em>errors</em> if applicable.

Arguments:errors (Microsoft.AspNetCore.Identity.IdentityError<Microsoft.AspNetCore.Identity.IdentityError>[]) – An optional array of Microsoft.AspNetCore.Identity.IdentityErrors which caused the operation to fail.
Return type:Microsoft.AspNetCore.Identity.IdentityResult
Returns:An Microsoft.AspNetCore.Identity.IdentityResult indicating a failed identity operation, with a list of <em>errors</em> if applicable.
public static IdentityResult Failed(params IdentityError[] errors)
ToString()

Converts the value of the current Microsoft.AspNetCore.Identity.IdentityResult object to its equivalent string representation.

Return type:System.String
Returns:A string representation of the current Microsoft.AspNetCore.Identity.IdentityResult object.
public override string ToString()