using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using TransportGuideDatabaseImplements.Models; namespace TransportGuideDatabaseImplements { public class TransportGuideDB : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql("Host=192.168.56.101;Port=5432;Database=TransportSubd;Username=postgres;Password=postgres"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Routes { set; get; } public virtual DbSet Stops { set; get; } public virtual DbSet StopRoutes { set; get; } public virtual DbSet TransportTypes { set; get; } } }