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)
|
|
|
|
|
{
|
2024-04-28 11:41:09 +04:00
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
optionsBuilder.UseSqlServer("Data Source=.\\SQLEXPRESS;Initial Catalog=FactoryGoWorkDB;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
2024-04-21 20:36:07 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
}
|