using VeterinaryDatabaseImplement.Models; using Microsoft.EntityFrameworkCore; namespace VeterinaryDatabaseImplement { public class VeterinaryDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder OptionsBuilder) { if (!OptionsBuilder.IsConfigured) { OptionsBuilder.UseNpgsql(@"Host=localhost;Port=5432;Database=vet;Username=postgres;Password=postgres"); } base.OnConfiguring(OptionsBuilder); AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); } public virtual DbSet Doctors { set; get; } public virtual DbSet Drugs { set; get; } public virtual DbSet Medications { set; get; } public virtual DbSet Services { set; get; } public virtual DbSet ServiceMedications { set; get; } public virtual DbSet DrugMedications{ set; get; } public virtual DbSet DrugServices { set; get; } //public virtual DbSet MedicationPets { set; get; } public virtual DbSet Owners { set; get; } public virtual DbSet Pets { set; get; } public virtual DbSet Visits { set; get; } public virtual DbSet Purchases { set; get; } public virtual DbSet VisitPets { set; get; } public virtual DbSet PurchasePets { set; get; } } }