using Chatbot.Api.Domain.Data.EntityTypeConfiguration; using Chatbot.Api.Domain.Entities; using Microsoft.EntityFrameworkCore; namespace Chatbot.Api.Domain.Data.DbContexts { public class ChatDbContext : DbContext { public DbSet Chats { get; set; } public ChatDbContext(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 ChatConfiguration()); } } }