Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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>
generic<typename TUser, typename TRole, typename TKey, typename TUserLogin, typename TUserRole, typename TUserClaim>
where TUser : IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>
where TRole : IdentityRole<TKey, TUserRole>
where TKey : Object, IEquatable<TKey>
where TUserLogin : gcnew(), IdentityUserLogin<TKey>
where TUserRole : gcnew(), IdentityUserRole<TKey>
where TUserClaim : gcnew(), IdentityUserClaim<TKey>
public ref class UserStore : 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
type UserStore<'TUser, 'TRole, 'TKey, 'TUserLogin, 'TUserRole, 'TUserClaim when 'TUser : IdentityUser<'TKey, 'TUserLogin, 'TUserRole, 'TUserClaim> when 'TRole : IdentityRole<'TKey, 'TUserRole> when 'TKey : Object and IEquatable<'TKey> when 'TUserLogin : new() and IdentityUserLogin<'TKey> when 'TUserRole : new() and IdentityUserRole<'TKey> when 'TUserClaim : new() and IdentityUserClaim<'TKey>> =
class
interface IUserLoginStore<'TUser, 'TKey>
interface IUserClaimStore<'TUser, 'TKey>
interface IUserRoleStore<'TUser, 'TKey>
interface IUserPasswordStore<'TUser, 'TKey>
interface IUserSecurityStampStore<'TUser, 'TKey>
interface IQueryableUserStore<'TUser, 'TKey>
interface IUserEmailStore<'TUser, 'TKey>
interface IUserPhoneNumberStore<'TUser, 'TKey>
interface IUserTwoFactorStore<'TUser, 'TKey>
interface IUserLockoutStore<'TUser, 'TKey>
interface IUserStore<'TUser, 'TKey>
interface IDisposable
end
Public Class UserStore(Of TUser As IdentityUser(Of TKey, TUserLogin, TUserRole, TUserClaim), TRole As IdentityRole(Of TKey, TUserRole), TKey As { Object, IEquatable(Of TKey) }, TUserLogin As { IdentityUserLogin(Of TKey), New }, TUserRole As { IdentityUserRole(Of TKey), New }, TUserClaim As { IdentityUserClaim(Of TKey), New })
Implements IUserLoginStore(Of TUser, TKey), IUserClaimStore(Of TUser, TKey),
IUserRoleStore(Of TUser, TKey), IUserPasswordStore(Of TUser, TKey),
IUserSecurityStampStore(Of TUser, TKey), IQueryableUserStore(Of TUser, TKey),
IUserEmailStore(Of TUser, TKey), IUserPhoneNumberStore(Of TUser, TKey),
IUserTwoFactorStore(Of TUser, TKey), IUserLockoutStore(Of TUser, TKey),
IUserStore(Of TUser, TKey), IDisposable
- 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.
Name | Description | |
---|---|---|
![]() |
UserStore<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. |
Name | Description | |
---|---|---|
![]() |
AutoSaveChanges | Gets or sets a value that indicates whether to call SaveChanges after Create/Update/Delete. |
![]() |
Context | Gets the context for the store. |
![]() |
DisposeContext | Gets or sets whether to dispose the DbContext during Dispose. |
![]() |
Users | Gets an IQueryable<T> of users. |
Name | Description | |
---|---|---|
![]() |
AddClaimAsync(TUser, Claim) | Asynchronously adds a claim to a user. |
![]() |
AddLoginAsync(TUser, UserLoginInfo) | Asynchronously adds a login to the user. |
![]() |
AddToRoleAsync(TUser, String) | Asynchronously adds a user to a role. |
![]() |
CreateAsync(TUser) | Asynchronously inserts an entity. |
![]() |
DeleteAsync(TUser) | Asynchronously marks an entity for deletion. |
![]() |
Dispose() | Releases all resources used by the current instance of the UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>. |
![]() |
Dispose(Boolean) | Releases the unmanaged resources used by the UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> class and optionally releases the managed resources. |
![]() |
Equals(Object) | (Inherited from Object.) |
![]() |
Finalize() | (Inherited from Object.) |
![]() |
FindAsync(UserLoginInfo) | Asynchronously returns the user associated with this login. |
![]() |
FindByEmailAsync(String) | Asynchronously finds a user by e-mail. |
![]() |
FindByIdAsync(TKey) | Asynchronously finds a user by ID. |
![]() |
FindByNameAsync(String) | Asynchronously finds a user by name. |
![]() |
GetAccessFailedCountAsync(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. |
![]() |
GetClaimsAsync(TUser) | Asynchronously returns the claims for a user. |
![]() |
GetEmailAsync(TUser) | Asynchronously gets the user's e-mail. |
![]() |
GetEmailConfirmedAsync(TUser) | Asynchronously returns whether the user email is confirmed. |
![]() |
GetHashCode() | (Inherited from Object.) |
![]() |
GetLockoutEnabledAsync(TUser) | Asynchronously returns whether the user can be locked out. |
![]() |
GetLockoutEndDateAsync(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. |
![]() |
GetLoginsAsync(TUser) | Asynchronously gets the logins for a user. |
![]() |
GetPasswordHashAsync(TUser) | Asynchronously gets the password hash for a user. |
![]() |
GetPhoneNumberAsync(TUser) | Asynchronously gets a user's phone number. |
![]() |
GetPhoneNumberConfirmedAsync(TUser) | Asynchronously returns whether the user phone number is confirmed. |
![]() |
GetRolesAsync(TUser) | Asynchronously gets the names of the roles a user is a member of. |
![]() |
GetSecurityStampAsync(TUser) | Asynchronously gets the security stamp for a user. |
![]() |
GetTwoFactorEnabledAsync(TUser) | Asynchronously determines whether the two-factor providers are enabled for the user. |
![]() |
GetType() | (Inherited from Object.) |
![]() |
GetUserAggregateAsync(Expression<Func<TUser, Boolean>>) | Used to attach child entities to the User aggregate, i.e. Roles, Logins, and Claims |
![]() |
HasPasswordAsync(TUser) | Asynchronously determines whether the user has a password set. |
![]() |
IncrementAccessFailedCountAsync(TUser) | Asynchronously records the failed attempt to access the user. |
![]() |
IsInRoleAsync(TUser, String) | Asynchronously determines whether the user is in the named role. |
![]() |
MemberwiseClone() | (Inherited from Object.) |
![]() |
RemoveClaimAsync(TUser, Claim) | Asynchronously removes a claim from a user. |
![]() |
RemoveFromRoleAsync(TUser, String) | Asynchronously removes a user from a role. |
![]() |
RemoveLoginAsync(TUser, UserLoginInfo) | Asynchronously removes a login from a user. |
![]() |
ResetAccessFailedCountAsync(TUser) | Asynchronously resets the account access failed count, typically after the account is successfully accessed. |
![]() |
SetEmailAsync(TUser, String) | Asynchronously sets the user e-mail. |
![]() |
SetEmailConfirmedAsync(TUser, Boolean) | Asynchronously sets the IsConfirmed property for the user. |
![]() |
SetLockoutEnabledAsync(TUser, Boolean) | Asynchronously sets whether the user can be locked out. |
![]() |
SetLockoutEndDateAsync(TUser, DateTimeOffset) | Asynchronously locks a user out until the specified end date (set to a past date, to unlock a user). |
![]() |
SetPasswordHashAsync(TUser, String) | Asynchronously sets the password hash for a user. |
![]() |
SetPhoneNumberAsync(TUser, String) | Asynchronously sets the user phone number. |
![]() |
SetPhoneNumberConfirmedAsync(TUser, Boolean) | Asynchronously sets the PhoneNumberConfirmed property for the user. |
![]() |
SetSecurityStampAsync(TUser, String) | Asynchronously sets the security stamp for the user. |
![]() |
SetTwoFactorEnabledAsync(TUser, Boolean) | Asynchronously sets the Two Factor provider for the user. |
![]() |
ToString() | (Inherited from Object.) |
![]() |
UpdateAsync(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.
Microsoft.AspNet.Identity.EntityFramework Namespace
ASP.NET Identity
Return to top