RoleStore<TRole> Class
EntityFramework based implementation
Inheritance Hierarchy
System.Object
Microsoft.AspNet.Identity.EntityFramework.RoleStore<TRole>
Namespace: Microsoft.AspNet.Identity.EntityFramework
Assembly: Microsoft.AspNet.Identity.EntityFramework (in Microsoft.AspNet.Identity.EntityFramework.dll)
Syntax
'Declaration
Public Class RoleStore(Of TRole As IdentityRole) _
Implements IRoleStore(Of TRole), IDisposable
'Usage
Dim instance As RoleStore(Of TRole)
public class RoleStore<TRole> : IRoleStore<TRole>,
IDisposable
where TRole : IdentityRole
generic<typename TRole>
where TRole : IdentityRole
public ref class RoleStore : IRoleStore<TRole>,
IDisposable
type RoleStore<'TRole when 'TRole : IdentityRole> =
class
interface IRoleStore<'TRole>
interface IDisposable
end
JScript does not support generic types and methods.
Type Parameters
- TRole
The RoleStore<TRole> type exposes the following members.
Constructors
Name | Description | |
---|---|---|
RoleStore<TRole>() | Default constuctor which uses a new instance of a default IdentityDbContext | |
RoleStore<TRole>(DbContext) | Constructor which takes a db context and wires up the stores with default instances using the context |
Top
Properties
Name | Description | |
---|---|---|
Context | Context for the store |
Top
Methods
Name | Description | |
---|---|---|
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.) | |
FindByIdAsync | Find a role by id | |
FindByNameAsync | Find a role by name | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
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.