26 lines
1.1 KiB
C#
26 lines
1.1 KiB
C#
using DatabaseImplement.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
namespace DatabaseImplement
|
|
{
|
|
public class FactoryGoWorkDatabase : DbContext
|
|
{
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=GoWorkDB;Username=postgres;Password=postgres");
|
|
}
|
|
|
|
public virtual DbSet<Product> Products { get; set; }
|
|
public virtual DbSet<Detail> Details { get; set; }
|
|
public virtual DbSet<DetailProduct> DetailProducts { get; set; }
|
|
public virtual DbSet<Production> Productions { get; set; }
|
|
public virtual DbSet<DetailProduction> DetailProductions { get; set; }
|
|
public virtual DbSet<Implementer> Implementers { get; set; }
|
|
public virtual DbSet<Guarantor> Guarantors { get; set; }
|
|
public virtual DbSet<Machine> Machines { get; set; }
|
|
public virtual DbSet<WorkerMachine> WorkerMachines { get; set; }
|
|
public virtual DbSet<Worker> Workers { get; set; }
|
|
public virtual DbSet<Workshop> Workshops { get; set; }
|
|
public virtual DbSet<WorkerWorkshop> WorkerWorkshops { get; set; }
|
|
}
|
|
}
|