CourseWork_FurnitureFactory/FurnitureFactory/FurnitureFactoryDataBaseImplement/FurnitureDataBase.cs
2023-05-19 14:16:33 +04:00

45 lines
1.7 KiB
C#

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.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(@"Host=localhost;Port=5432;Database=FurnitureFactory;Username=postgres;Password=Jus999666Y");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Manager> Managers { set; get; }
public virtual DbSet<SalesSalons> SalesSalons { set; get; }
public virtual DbSet<Headset> Headsets { set; get; }
public virtual DbSet<HeadsetSalesSalons> HeadsetSalesSalons { set; get; }
public virtual DbSet<Orders> Orders { set; get; }
public virtual DbSet<OrdersSalesSalons> OrdersSalesSalons { set; get; }
public virtual DbSet<HeadsetModule> HeadsetModules { set; get; }
public virtual DbSet<FurnitureMaterial> FurnitureMaterials { set; get; }
public virtual DbSet<Furniture> Furnitures { set; get; }
public virtual DbSet<Master> Masters { set; get; }
public virtual DbSet<HeadsetModuleMaterial> HeadsetModuleMaterials { set; get; }
public virtual DbSet<Material> Materials { set; get; }
}
}