26 lines
797 B
C#
26 lines
797 B
C#
using IdentityServer.Domain.Data.EntityTypeConfiguration;
|
|
using IdentityServer.Domain.Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace IdentityServer.Domain.Data.DbContexts
|
|
{
|
|
public class IdentityDbContext : DbContext
|
|
{
|
|
public DbSet<AppUser> AppUsers { get; set; }
|
|
|
|
public IdentityDbContext(DbContextOptions<IdentityDbContext> 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());
|
|
}
|
|
}
|
|
}
|