Coursach/Course/DatabaseImplement/FactoryGoWorkDatabase.cs

26 lines
1.1 KiB
C#
Raw Normal View History

2024-04-21 20:36:07 +04:00
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; }
2024-04-27 12:35:20 +04:00
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; }
2024-04-21 20:36:07 +04:00
}
}