46 lines
1.5 KiB
C#
46 lines
1.5 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.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<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<Master> Masters { set; get; }
|
|||
|
|
|||
|
public virtual DbSet<Material> Materials { set; get; }
|
|||
|
|
|||
|
}
|
|||
|
}
|