using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using SessionZeroBackend.Models; namespace SessionZeroBackend; public class ApplicationDbContext : IdentityDbContext { public ApplicationDbContext(DbContextOptions options) : base(options) {} protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity(entity => { entity.ToTable("Users"); entity.HasIndex(u => u.Email).IsUnique(); entity.HasIndex(u => u.UserName).IsUnique(); }); } }