using AyCode.Database.DbSets.Loggers;
using AyCode.Entities.Server.LogItems;
using AyCode.Interfaces.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.Identity.Client;

namespace AyCode.Database.DbContexts.Loggers;

public class AcLoggerDbContextBase<TLogItem> : AcDbContextBase, IAcLoggerDbContextBase<TLogItem> where TLogItem : class, IAcLogItem
{
    public DbSet<TLogItem> LogItems { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        base.OnConfiguring(optionsBuilder);
        
        optionsBuilder.UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking);
    }
}