UserStore<TUser> Class
Implements IUserStore using EntityFramework where TUser is the entity type of the user being stored
Inheritance Hierarchy
System.Object
Microsoft.AspNet.Identity.EntityFramework.UserStore<TUser>
Namespace: Microsoft.AspNet.Identity.EntityFramework
Assembly: Microsoft.AspNet.Identity.EntityFramework (in Microsoft.AspNet.Identity.EntityFramework.dll)
Syntax
'Declaration
Public Class UserStore(Of TUser As IdentityUser) _
Implements IUserLoginStore(Of TUser), IUserClaimStore(Of TUser), _
IUserRoleStore(Of TUser), IUserPasswordStore(Of TUser), IUserSecurityStampStore(Of TUser), _
IUserStore(Of TUser), IDisposable
'Usage
Dim instance As UserStore(Of TUser)
public class UserStore<TUser> : IUserLoginStore<TUser>,
IUserClaimStore<TUser>, IUserRoleStore<TUser>, IUserPasswordStore<TUser>, IUserSecurityStampStore<TUser>,
IUserStore<TUser>, IDisposable
where TUser : IdentityUser
generic<typename TUser>
where TUser : IdentityUser
public ref class UserStore : IUserLoginStore<TUser>,
IUserClaimStore<TUser>, IUserRoleStore<TUser>, IUserPasswordStore<TUser>, IUserSecurityStampStore<TUser>,
IUserStore<TUser>, IDisposable
type UserStore<'TUser when 'TUser : IdentityUser> =
class
interface IUserLoginStore<'TUser>
interface IUserClaimStore<'TUser>
interface IUserRoleStore<'TUser>
interface IUserPasswordStore<'TUser>
interface IUserSecurityStampStore<'TUser>
interface IUserStore<'TUser>
interface IDisposable
end
JScript does not support generic types and methods.
Type Parameters
- TUser
The UserStore<TUser> type exposes the following members.
Constructors
Name | Description | |
---|---|---|
UserStore<TUser>() | Default constuctor which uses a new instance of a default EntityyDbContext | |
UserStore<TUser>(DbContext) | Constructor that takes the db context |
Top
Properties
Name | Description | |
---|---|---|
AutoSaveChanges | If true will call SaveChanges after Create/Update/Delete | |
Context | Context for the store | |
DisposeContext | If true will call dispose on the DbContext during Dipose |
Top
Methods
Name | Description | |
---|---|---|
AddClaimAsync | Add a claim to a user | |
AddLoginAsync | Add a login to the user | |
AddToRoleAsync | Add a user to a role | |
CreateAsync | Insert an entity | |
DeleteAsync | Mark an entity for deletion | |
Dispose() | Dispose the store | |
Dispose(Boolean) | If disposing, calls dispose on the Context. Always nulls out the Context | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
FindAsync | Returns the user associated with this login | |
FindByIdAsync | Find a user by id | |
FindByNameAsync | Find a user by name | |
GetClaimsAsync | Return the claims for a user | |
GetHashCode | (Inherited from Object.) | |
GetLoginsAsync | Get the logins for a user | |
GetPasswordHashAsync | Get the password hash for a user | |
GetRolesAsync | Get the names of the roles a user is a member of | |
GetSecurityStampAsync | Get the security stamp for a user | |
GetType | (Inherited from Object.) | |
HasPasswordAsync | Returns true if the user has a password set | |
IsInRoleAsync | Returns true if the user is in the named role | |
MemberwiseClone | (Inherited from Object.) | |
RemoveClaimAsync | Remove a claim from a user | |
RemoveFromRoleAsync | Remove a user from a role | |
RemoveLoginAsync | Remove a login from a user | |
SetPasswordHashAsync | Set the password hash for a user | |
SetSecurityStampAsync | Set the security stamp for the user | |
ToString | (Inherited from Object.) | |
UpdateAsync | Update an entity |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.