using LC_AddCheckToDb.Models;
using Microsoft.EntityFrameworkCore;

namespace LC_AddCheckToDb;

public partial class Db : DbContext
{
    public Db() => Database.EnsureCreated();
    public virtual DbSet<Error> Error { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        //optionsBuilder.UseNpgsql("Host=172.24.12.201;Port=5432;Database=Notifications;Username=postgres;Password=4NUDZhJ7");
        optionsBuilder.UseSqlite("Data Source=C:\\Users\\mastankov\\Desktop\\ForMonitoring\\Soft\\LC_Api\\Error.db");
    }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        OnModelCreatingPartial(modelBuilder);
    }

    partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}