using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.EntityFrameworkCore; using FurnitureFactoryDataBaseImplement.Models; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Reflection.Metadata; using System.Runtime.ConstrainedExecution; using System.Text; using System.Threading.Tasks; using HeadsetModule = FurnitureFactoryDataBaseImplement.Models.HeadsetModule; using System.Threading.Tasks; namespace FurnitureFactoryDataBaseImplement { public class FurnitureDataBase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseNpgsql("Server=PostgreSQL;Host=localhost;Port=5432;Database=FurnitureFactoryDataBase;Username=postgres;Password=postgres"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Managers { set; get; } public virtual DbSet SalesSalons { set; get; } public virtual DbSet Headsets { set; get; } public virtual DbSet HeadsetSalesSalons { set; get; } public virtual DbSet Orders { set; get; } public virtual DbSet OrdersSalesSalons { set; get; } public virtual DbSet HeadsetModules { set; get; } public virtual DbSet FurnitureMaterials { set; get; } public virtual DbSet Furnitures { set; get; } public virtual DbSet Masters { set; get; } public virtual DbSet HeadsetModuleMaterials { set; get; } public virtual DbSet Materials { set; get; } } }