Class IdentityStore<TContext, TUser>
- Assembly
- Stratara.EventSourcing.EntityFrameworkCore.dll
Generic ASP.NET Core Identity DbContext that hosts the AspNetUsers, AspNetRoles,
and related identity tables. Adds an AspNetUserPasskeys table for WebAuthn / passkey
credentials with JSON-stored credential data.
public class IdentityStore<TContext, TUser> : IdentityDbContext<TUser>, IInfrastructure<IServiceProvider>, IDbContextDependencies, IDbSetCache, IDbContextPoolable, IResettableService, IDisposable, IAsyncDisposable, IIdentityDbContext, IDbContext where TContext : DbContext where TUser : IdentityUser
Type Parameters
TContextThe concrete derived DbContext type (used for DbContextOptions<TContext> binding).
TUserThe identity user entity, deriving from IdentityUser.
- Inheritance
-
IdentityUserContext<TUser, string, IdentityUserClaim<string>, IdentityUserLogin<string>, IdentityUserToken<string>, IdentityUserPasskey<string>>IdentityDbContext<TUser, IdentityRole, string, IdentityUserClaim<string>, IdentityUserRole<string>, IdentityUserLogin<string>, IdentityRoleClaim<string>, IdentityUserToken<string>, IdentityUserPasskey<string>>IdentityDbContext<TUser, IdentityRole, string, IdentityUserClaim<string>, IdentityUserRole<string>, IdentityUserLogin<string>, IdentityRoleClaim<string>, IdentityUserToken<string>>IdentityDbContext<TUser>IdentityStore<TContext, TUser>
- Implements
- Inherited Members
- Extension Methods
Remarks
Filters ApplyConfigurationsFromAssembly by namespace so the write-store and read-store
IEntityTypeConfiguration<> implementations co-hosted in the same assembly do not
leak into the identity model. Missing the filter would surface as
PendingModelChangesWarning at runtime against a real Postgres instance.
Constructors
IdentityStore(DbContextOptions<TContext>)
Generic ASP.NET Core Identity DbContext that hosts the AspNetUsers, AspNetRoles,
and related identity tables. Adds an AspNetUserPasskeys table for WebAuthn / passkey
credentials with JSON-stored credential data.
public IdentityStore(DbContextOptions<TContext> options)
Parameters
optionsDbContextOptions<TContext>Options bound by the host's
AddNpgsqlIdentityDbContextFactoryregistration.
Remarks
Filters ApplyConfigurationsFromAssembly by namespace so the write-store and read-store
IEntityTypeConfiguration<> implementations co-hosted in the same assembly do not
leak into the identity model. Missing the filter would surface as
PendingModelChangesWarning at runtime against a real Postgres instance.
Methods
OnModelCreating(ModelBuilder)
Configures the schema needed for the identity framework.
protected override void OnModelCreating(ModelBuilder builder)
Parameters
builderModelBuilderThe builder being used to construct the model for this context.