CourseWork_FurnitureFactory/FurnitureFactory/FurnitureFactoryDataBaseImplement/FurnitureDataBase.cs

45 lines
1.8 KiB
C#
Raw Normal View History

2023-04-07 18:23:45 +04:00
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)
{
2023-04-08 22:03:52 +04:00
optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=FurnitureFactory;Username=postgres;Password=Jus999666Y");
2023-04-07 18:23:45 +04:00
}
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; }
2023-04-08 16:14:43 +04:00
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; }
2023-04-07 18:23:45 +04:00
public virtual DbSet<Material> Materials { set; get; }
}
}