using BookShopDataBaseImplement.Models; using Microsoft.EntityFrameworkCore; namespace BookShopDataBaseImplement { public class BookShopDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql(@"Host=192.168.56.101;Port=5432;Database=SUBD_Lab2;Username=postgres;Password=postgres"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Authors { set; get; } public virtual DbSet Books { set; get; } public virtual DbSet BookAuthors { set; get; } public virtual DbSet Orders { set; get; } public virtual DbSet Clients { set; get; } public virtual DbSet Genres { set; get; } } }