using IdentityServer.Domain.Data.EntityTypeConfiguration; using IdentityServer.Domain.Entities; using Microsoft.EntityFrameworkCore; namespace IdentityServer.Domain.Data.DbContexts { public class IdentityDbContext : DbContext { public DbSet Users { 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 UserStatusConfiguration()); modelBuilder.ApplyConfiguration(new AppUserConfiguration()); modelBuilder.ApplyConfiguration(new UserClaimConfiguration()); } } }