UserOnlyStore<TUser,TContext,TKey> Class

Definition

Represents a new instance of a persistence store for the specified user and role types.

generic <typename TUser, typename TContext, typename TKey>
 where TUser : IdentityUser<TKey> where TContext : DbContext where TKey : IEquatable<TKey>public ref class UserOnlyStore : Microsoft::AspNetCore::Identity::EntityFrameworkCore::UserOnlyStore<TUser, TContext, TKey, Microsoft::AspNetCore::Identity::IdentityUserClaim<TKey> ^, Microsoft::AspNetCore::Identity::IdentityUserLogin<TKey> ^, Microsoft::AspNetCore::Identity::IdentityUserToken<TKey> ^>
public class UserOnlyStore<TUser,TContext,TKey> : Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserOnlyStore<TUser,TContext,TKey,Microsoft.AspNetCore.Identity.IdentityUserClaim<TKey>,Microsoft.AspNetCore.Identity.IdentityUserLogin<TKey>,Microsoft.AspNetCore.Identity.IdentityUserToken<TKey>> where TUser : IdentityUser<TKey> where TContext : DbContext where TKey : IEquatable<TKey>
type UserOnlyStore<'User, 'Context, 'Key (requires 'User :> IdentityUser<'Key> and 'Context :> DbContext and 'Key :> IEquatable<'Key>)> = class
    inherit UserOnlyStore<'User, 'Context, 'Key, IdentityUserClaim<'Key>, IdentityUserLogin<'Key>, IdentityUserToken<'Key> (requires 'User :> IdentityUser<'Key> and 'Context :> DbContext and 'Key :> IEquatable<'Key>)>
Public Class UserOnlyStore(Of TUser, TContext, TKey)
Inherits UserOnlyStore(Of TUser, TContext, TKey, IdentityUserClaim(Of TKey), IdentityUserLogin(Of TKey), IdentityUserToken(Of TKey))

Type Parameters

TUser

The type representing a user.

TContext

The type of the data context class used to access the store.

TKey

The type of the primary key for a role.

Inheritance
Derived

Constructors

UserOnlyStore<TUser,TContext,TKey>(TContext, IdentityErrorDescriber)

Constructs a new instance of UserStore<TUser,TRole,TContext,TKey>.

Properties

AutoSaveChanges

Gets or sets a flag indicating if changes should be persisted after CreateAsync, UpdateAsync and DeleteAsync are called.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
Context

Gets the database context for this store.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
ErrorDescriber

Gets or sets the IdentityErrorDescriber for any error that occurred with the current operation.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
UserClaims

DbSet of user claims.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
UserLogins

DbSet of user logins.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
Users

A navigation property for the users the store contains.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
UsersSet

DbSet of users.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
UserTokens

DbSet of user tokens.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)

Methods

AddClaimsAsync(TUser, IEnumerable<Claim>, CancellationToken)

Adds the claims given to the specified user.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
AddLoginAsync(TUser, UserLoginInfo, CancellationToken)

Adds the login given to the specified user.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
AddUserTokenAsync(TUserToken)

Add a new user token.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
AddUserTokenAsync(TUserToken)

Add a new user token.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
ConvertIdFromString(String)

Converts the provided id to a strongly typed key object.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
ConvertIdToString(TKey)

Converts the provided id to its string representation.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
CountCodesAsync(TUser, CancellationToken)

Returns how many recovery code are still valid for a user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
CreateAsync(TUser, CancellationToken)

Creates the specified user in the user store.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
CreateUserClaim(TUser, Claim)

Called to create a new instance of a IdentityUserClaim<TKey>.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
CreateUserLogin(TUser, UserLoginInfo)

Called to create a new instance of a IdentityUserLogin<TKey>.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
CreateUserToken(TUser, String, String, String)

Called to create a new instance of a IdentityUserToken<TKey>.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
DeleteAsync(TUser, CancellationToken)

Deletes the specified user from the user store.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
Dispose()

Dispose the store

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
FindByEmailAsync(String, CancellationToken)

Gets the user, if any, associated with the specified, normalized email address.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
FindByIdAsync(String, CancellationToken)

Finds and returns a user, if any, who has the specified userId.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
FindByLoginAsync(String, String, CancellationToken)

Retrieves the user associated with the specified login provider and login provider key.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
FindByNameAsync(String, CancellationToken)

Finds and returns a user, if any, who has the specified normalized user name.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
FindTokenAsync(TUser, String, String, CancellationToken)

Find a user token if it exists.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
FindUserAsync(TKey, CancellationToken)

Return a user with the matching userId if it exists.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
FindUserAsync(TKey, CancellationToken)

Return a user with the matching userId if it exists.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
FindUserLoginAsync(String, String, CancellationToken)

Return a user login with provider, providerKey if it exists.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
FindUserLoginAsync(TKey, String, String, CancellationToken)

Return a user login with the matching userId, provider, providerKey if it exists.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
FindUserLoginAsync(TKey, String, String, CancellationToken)

Return a user login with the matching userId, provider, providerKey if it exists.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
GetAccessFailedCountAsync(TUser, CancellationToken)

Retrieves the current failed access count for the specified user..

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetAuthenticatorKeyAsync(TUser, CancellationToken)

Get the authenticator key for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetClaimsAsync(TUser, CancellationToken)

Get the claims associated with the specified user as an asynchronous operation.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
GetEmailAsync(TUser, CancellationToken)

Gets the email address for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetEmailConfirmedAsync(TUser, CancellationToken)

Gets a flag indicating whether the email address for the specified user has been verified, true if the email address is verified otherwise false.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetLockoutEnabledAsync(TUser, CancellationToken)

Retrieves a flag indicating whether user lockout can enabled for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetLockoutEndDateAsync(TUser, CancellationToken)

Gets the last DateTimeOffset a user's last lockout expired, if any. Any time in the past should be indicates a user is not locked out.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetLoginsAsync(TUser, CancellationToken)

Retrieves the associated logins for the specified .

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
GetNormalizedEmailAsync(TUser, CancellationToken)

Returns the normalized email for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetNormalizedUserNameAsync(TUser, CancellationToken)

Gets the normalized user name for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetPasswordHashAsync(TUser, CancellationToken)

Gets the password hash for a user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetPhoneNumberAsync(TUser, CancellationToken)

Gets the telephone number, if any, for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetPhoneNumberConfirmedAsync(TUser, CancellationToken)

Gets a flag indicating whether the specified user's telephone number has been confirmed.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetSecurityStampAsync(TUser, CancellationToken)

Get the security stamp for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetTokenAsync(TUser, String, String, CancellationToken)

Returns the token value.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetTwoFactorEnabledAsync(TUser, CancellationToken)

Returns a flag indicating whether the specified user has two factor authentication enabled or not, as an asynchronous operation.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetUserIdAsync(TUser, CancellationToken)

Gets the user identifier for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetUserNameAsync(TUser, CancellationToken)

Gets the user name for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
GetUsersForClaimAsync(Claim, CancellationToken)

Retrieves all users with the specified claim.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
HasPasswordAsync(TUser, CancellationToken)

Returns a flag indicating if the specified user has a password.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
IncrementAccessFailedCountAsync(TUser, CancellationToken)

Records that a failed access has occurred, incrementing the failed access count.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
RedeemCodeAsync(TUser, String, CancellationToken)

Returns whether a recovery code is valid for a user. Note: recovery codes are only valid once, and will be invalid after use.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
RemoveClaimsAsync(TUser, IEnumerable<Claim>, CancellationToken)

Removes the claims given from the specified user.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
RemoveLoginAsync(TUser, String, String, CancellationToken)

Removes the loginProvider given from the specified user.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
RemoveTokenAsync(TUser, String, String, CancellationToken)

Deletes a token for a user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
RemoveUserTokenAsync(TUserToken)

Remove a new user token.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
RemoveUserTokenAsync(TUserToken)

Remove a new user token.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
ReplaceClaimAsync(TUser, Claim, Claim, CancellationToken)

Replaces the claim on the specified user, with the newClaim.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
ReplaceCodesAsync(TUser, IEnumerable<String>, CancellationToken)

Updates the recovery codes for the user while invalidating any previous recovery codes.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
ResetAccessFailedCountAsync(TUser, CancellationToken)

Resets a user's failed access count.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SaveChanges(CancellationToken)

Saves the current store.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)
SetAuthenticatorKeyAsync(TUser, String, CancellationToken)

Sets the authenticator key for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetEmailAsync(TUser, String, CancellationToken)

Sets the email address for a user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetEmailConfirmedAsync(TUser, Boolean, CancellationToken)

Sets the flag indicating whether the specified user's email address has been confirmed or not.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetLockoutEnabledAsync(TUser, Boolean, CancellationToken)

Set the flag indicating if the specified user can be locked out..

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetLockoutEndDateAsync(TUser, Nullable<DateTimeOffset>, CancellationToken)

Locks out a user until the specified end date has passed. Setting a end date in the past immediately unlocks a user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetNormalizedEmailAsync(TUser, String, CancellationToken)

Sets the normalized email for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetNormalizedUserNameAsync(TUser, String, CancellationToken)

Sets the given normalized name for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetPasswordHashAsync(TUser, String, CancellationToken)

Sets the password hash for a user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetPhoneNumberAsync(TUser, String, CancellationToken)

Sets the telephone number for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetPhoneNumberConfirmedAsync(TUser, Boolean, CancellationToken)

Sets a flag indicating if the specified user's phone number has been confirmed..

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetSecurityStampAsync(TUser, String, CancellationToken)

Sets the provided security stamp for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetTokenAsync(TUser, String, String, String, CancellationToken)

Sets the token value for a particular user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetTwoFactorEnabledAsync(TUser, Boolean, CancellationToken)

Sets a flag indicating whether the specified user has two factor authentication enabled or not, as an asynchronous operation.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
SetUserNameAsync(TUser, String, CancellationToken)

Sets the given userName for the specified user.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
ThrowIfDisposed()

Throws if this class has been disposed.

(Inherited from UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>)
UpdateAsync(TUser, CancellationToken)

Updates the specified user in the user store.

(Inherited from UserOnlyStore<TUser,TContext,TKey,TUserClaim,TUserLogin,TUserToken>)

Applies to