20 lines
730 B
C#
20 lines
730 B
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; }
|
|
}
|
|
}
|