using Microsoft.EntityFrameworkCore; using TravelAgencyDatabaseImplement.Models; namespace TravelAgencyDatabaseImplement { public class TravelAgencyDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql("Host=localhost;Database=CarRepairShopDBHard;Username=postgres;Password=postgres"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Excursions { set; get; } public virtual DbSet ExcursionGroups { set; get; } public virtual DbSet Tours { set; get; } public virtual DbSet ExcursionTours { set; get; } public virtual DbSet ExcursionGroupTours { set; get; } public virtual DbSet ExcursionGroupPlaces { set; get; } public virtual DbSet Guides { set; get; } public virtual DbSet Places { set; get; } public virtual DbSet Users { set; get; } public virtual DbSet Trips { set; get; } public virtual DbSet TripPlaces { set; get; } } }