UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> Class

 

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

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

System.Object
  Microsoft.AspNet.Identity.EntityFramework.UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>
    Microsoft.AspNet.Identity.EntityFramework.UserStore<TUser>

public class UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> : IUserLoginStore<TUser, TKey>, 
	IUserClaimStore<TUser, TKey>, IUserRoleStore<TUser, TKey>, IUserPasswordStore<TUser, TKey>, 
	IUserSecurityStampStore<TUser, TKey>, IQueryableUserStore<TUser, TKey>, 
	IUserEmailStore<TUser, TKey>, IUserPhoneNumberStore<TUser, TKey>, 
	IUserTwoFactorStore<TUser, TKey>, IUserLockoutStore<TUser, TKey>, 
	IUserStore<TUser, TKey>, IDisposable
where TUser : IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>
where TRole : IdentityRole<TKey, TUserRole>
where TKey : object, IEquatable<TKey>
where TUserLogin : new(), IdentityUserLogin<TKey>
where TUserRole : new(), IdentityUserRole<TKey>
where TUserClaim : new(), IdentityUserClaim<TKey>

Type Parameters

TUser

The type of the user.

TRole

The type of the role.

TKey

The type of the key.

TUserLogin

The type of the user login.

TUserRole

The type of the user role.

TUserClaim

The type of the user claim.

NameDescription
System_CAPS_pubmethodUserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>(DbContext)

Initializes a new instance of the UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> class which takes a db context and wires up the stores with default instances using the context.

NameDescription
System_CAPS_pubpropertyAutoSaveChanges

Gets or sets a value that indicates whether to call SaveChanges after Create/Update/Delete.

System_CAPS_pubpropertyContext

Gets the context for the store.

System_CAPS_pubpropertyDisposeContext

Gets or sets whether to dispose the DbContext during Dispose.

System_CAPS_pubpropertyUsers

Gets an IQueryable<T> of users.

NameDescription
System_CAPS_pubmethodAddClaimAsync(TUser, Claim)

Asynchronously adds a claim to a user.

System_CAPS_pubmethodAddLoginAsync(TUser, UserLoginInfo)

Asynchronously adds a login to the user.

System_CAPS_pubmethodAddToRoleAsync(TUser, String)

Asynchronously adds a user to a role.

System_CAPS_pubmethodCreateAsync(TUser)

Asynchronously inserts an entity.

System_CAPS_pubmethodDeleteAsync(TUser)

Asynchronously marks an entity for deletion.

System_CAPS_pubmethodDispose()

Releases all resources used by the current instance of the UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.

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.

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.

System_CAPS_pubmethodFindByEmailAsync(String)

Asynchronously finds a user by e-mail.

System_CAPS_pubmethodFindByIdAsync(TKey)

Asynchronously finds a user by ID.

System_CAPS_pubmethodFindByNameAsync(String)

Asynchronously finds a user by name.

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.

System_CAPS_pubmethodGetClaimsAsync(TUser)

Asynchronously returns the claims for a user.

System_CAPS_pubmethodGetEmailAsync(TUser)

Asynchronously gets the user's e-mail.

System_CAPS_pubmethodGetEmailConfirmedAsync(TUser)

Asynchronously returns whether the user email is confirmed.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetLockoutEnabledAsync(TUser)

Asynchronously returns whether the user can be locked out.

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.

System_CAPS_pubmethodGetLoginsAsync(TUser)

Asynchronously gets the logins for a user.

System_CAPS_pubmethodGetPasswordHashAsync(TUser)

Asynchronously gets the password hash for a user.

System_CAPS_pubmethodGetPhoneNumberAsync(TUser)

Asynchronously gets a user's phone number.

System_CAPS_pubmethodGetPhoneNumberConfirmedAsync(TUser)

Asynchronously returns whether the user phone number is confirmed.

System_CAPS_pubmethodGetRolesAsync(TUser)

Asynchronously gets the names of the roles a user is a member of.

System_CAPS_pubmethodGetSecurityStampAsync(TUser)

Asynchronously gets the security stamp for a user.

System_CAPS_pubmethodGetTwoFactorEnabledAsync(TUser)

Asynchronously determines whether the two-factor providers are enabled for the user.

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

System_CAPS_pubmethodHasPasswordAsync(TUser)

Asynchronously determines whether the user has a password set.

System_CAPS_pubmethodIncrementAccessFailedCountAsync(TUser)

Asynchronously records the failed attempt to access the user.

System_CAPS_pubmethodIsInRoleAsync(TUser, String)

Asynchronously determines whether the user is in the named role.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodRemoveClaimAsync(TUser, Claim)

Asynchronously removes a claim from a user.

System_CAPS_pubmethodRemoveFromRoleAsync(TUser, String)

Asynchronously removes a user from a role.

System_CAPS_pubmethodRemoveLoginAsync(TUser, UserLoginInfo)

Asynchronously removes a login from a user.

System_CAPS_pubmethodResetAccessFailedCountAsync(TUser)

Asynchronously resets the account access failed count, typically after the account is successfully accessed.

System_CAPS_pubmethodSetEmailAsync(TUser, String)

Asynchronously sets the user e-mail.

System_CAPS_pubmethodSetEmailConfirmedAsync(TUser, Boolean)

Asynchronously sets the IsConfirmed property for the user.

System_CAPS_pubmethodSetLockoutEnabledAsync(TUser, Boolean)

Asynchronously sets whether the user can be locked out.

System_CAPS_pubmethodSetLockoutEndDateAsync(TUser, DateTimeOffset)

Asynchronously locks a user out until the specified end date (set to a past date, to unlock a user).

System_CAPS_pubmethodSetPasswordHashAsync(TUser, String)

Asynchronously sets the password hash for a user.

System_CAPS_pubmethodSetPhoneNumberAsync(TUser, String)

Asynchronously sets the user phone number.

System_CAPS_pubmethodSetPhoneNumberConfirmedAsync(TUser, Boolean)

Asynchronously sets the PhoneNumberConfirmed property for the user.

System_CAPS_pubmethodSetSecurityStampAsync(TUser, String)

Asynchronously sets the security stamp for the user.

System_CAPS_pubmethodSetTwoFactorEnabledAsync(TUser, Boolean)

Asynchronously sets the Two Factor provider for the user.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodUpdateAsync(TUser)

Asynchronously updates an entity.

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: