mirror of
https://dev.azure.com/tstanciu94/Tuitio/_git/Tuitio
synced 2025-03-28 23:52:20 +02:00
28 lines
945 B
C#
28 lines
945 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> Users { 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 UserStatusConfiguration());
|
|
modelBuilder.ApplyConfiguration(new AppUserConfiguration());
|
|
modelBuilder.ApplyConfiguration(new UserClaimConfiguration());
|
|
}
|
|
}
|
|
}
|