UserStore<TUser> Class

 

Represents an Entity Framework implementation of a store that supports IUserStore, IUserLoginStore, IUserClaimStore and IUserRoleStore.

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


public class UserStore<TUser> : UserStore<TUser, IdentityRole, string, IdentityUserLogin, IdentityUserRole, IdentityUserClaim>, 
	IUserStore<TUser>, IUserStore<TUser, string>, IDisposable
where TUser : IdentityUser

Type Parameters

TUser

The type of the user.

NameDescription
System_CAPS_pubmethodUserStore<TUser>()

Initializes a new instance of the UserStore<TUser> class which uses a new instance of a default EntityyDbContext.

System_CAPS_pubmethodUserStore<TUser>(DbContext)

Initializes a new instance of the UserStore<TUser> class.

NameDescription
System_CAPS_pubpropertyAutoSaveChanges

Gets or sets a value that indicates whether to call SaveChanges after Create/Update/Delete.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubpropertyContext
System_CAPS_pubpropertyDisposeContext

Gets or sets whether to dispose the DbContext during Dispose.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubpropertyUsers

NameDescription
System_CAPS_pubmethodAddClaimAsync(TUser, Claim)

Asynchronously adds a claim to a user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodAddLoginAsync(TUser, UserLoginInfo)

Asynchronously adds a login to the user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodAddToRoleAsync(TUser, String)

Asynchronously adds a user to a role.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodCreateAsync(TUser)

Asynchronously inserts an entity.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodDeleteAsync(TUser)

Asynchronously marks an entity for deletion.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodDispose()
System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> class and optionally releases the managed resources.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodFindAsync(UserLoginInfo)

Asynchronously returns the user associated with this login.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodFindByEmailAsync(String)

Asynchronously finds a user by e-mail.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodFindByIdAsync(TKey)

Asynchronously finds a user by ID.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodFindByNameAsync(String)

Asynchronously finds a user by name.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetAccessFailedCountAsync(TUser)

Asynchronously returns the current number of failed access attempts. This number usually will be reset whenever the password is verified or the account is locked out.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetClaimsAsync(TUser)

Asynchronously returns the claims for a user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetEmailAsync(TUser)

Asynchronously gets the user's e-mail.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetEmailConfirmedAsync(TUser)

Asynchronously returns whether the user email is confirmed.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetLockoutEnabledAsync(TUser)

Asynchronously returns whether the user can be locked out.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetLockoutEndDateAsync(TUser)

Asynchronously returns the DateTimeOffset that represents the end of a user's lockout, any time in the past should be considered not locked out.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetLoginsAsync(TUser)

Asynchronously gets the logins for a user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetPasswordHashAsync(TUser)

Asynchronously gets the password hash for a user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetPhoneNumberAsync(TUser)

Asynchronously gets a user's phone number.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetPhoneNumberConfirmedAsync(TUser)

Asynchronously returns whether the user phone number is confirmed.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetRolesAsync(TUser)

Asynchronously gets the names of the roles a user is a member of.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetSecurityStampAsync(TUser)

Asynchronously gets the security stamp for a user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetTwoFactorEnabledAsync(TUser)

Asynchronously determines whether the two-factor providers are enabled for the user. (Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodGetUserAggregateAsync(Expression<Func<TUser, Boolean>>)

Used to attach child entities to the User aggregate, i.e. Roles, Logins, and Claims(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodHasPasswordAsync(TUser)

Asynchronously determines whether the user has a password set.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodIncrementAccessFailedCountAsync(TUser)

Asynchronously records the failed attempt to access the user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodIsInRoleAsync(TUser, String)

Asynchronously determines whether the user is in the named role.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodRemoveClaimAsync(TUser, Claim)

Asynchronously removes a claim from a user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodRemoveFromRoleAsync(TUser, String)

Asynchronously removes a user from a role.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodRemoveLoginAsync(TUser, UserLoginInfo)

Asynchronously removes a login from a user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodResetAccessFailedCountAsync(TUser)

Asynchronously resets the account access failed count, typically after the account is successfully accessed.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodSetEmailAsync(TUser, String)

Asynchronously sets the user e-mail.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodSetEmailConfirmedAsync(TUser, Boolean)

Asynchronously sets the IsConfirmed property for the user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodSetLockoutEnabledAsync(TUser, Boolean)

Asynchronously sets whether the user can be locked out.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodSetLockoutEndDateAsync(TUser, DateTimeOffset)

Asynchronously locks a user out until the specified end date (set to a past date, to unlock a user).(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodSetPasswordHashAsync(TUser, String)

Asynchronously sets the password hash for a user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodSetPhoneNumberAsync(TUser, String)

Asynchronously sets the user phone number.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodSetPhoneNumberConfirmedAsync(TUser, Boolean)

Asynchronously sets the PhoneNumberConfirmed property for the user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodSetSecurityStampAsync(TUser, String)

Asynchronously sets the security stamp for the user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodSetTwoFactorEnabledAsync(TUser, Boolean)

Asynchronously sets the Two Factor provider for the user.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodUpdateAsync(TUser)

Asynchronously updates an entity.(Inherited from UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: