Skip to main content
Table of Contents

Class IdentityStore<TContext, TUser>

Namespace
Stratara.EventSourcing.EntityFrameworkCore.IdentityStore
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

TContext

The concrete derived DbContext type (used for DbContextOptions<TContext> binding).

TUser

The identity user entity, deriving from IdentityUser.

Inheritance
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

options DbContextOptions<TContext>

Options bound by the host's AddNpgsqlIdentityDbContextFactory registration.

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

builder ModelBuilder

The builder being used to construct the model for this context.