using IdentityServer.Domain.Data.EntityTypeConfiguration; using IdentityServer.Domain.Entities; using Microsoft.EntityFrameworkCore; namespace IdentityServer.Domain.Data.DbContexts { public class IdentityDbContext : DbContext { public DbSet AppUsers { get; set; } public IdentityDbContext(DbContextOptions options) : base(options) { base.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.TrackAll; base.ChangeTracker.AutoDetectChangesEnabled = true; } protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.ApplyConfiguration(new AppUserConfiguration()); } } }