2024-05-04 20:14:41 +04:00
|
|
|
|
using FurnitureAssemblyDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace FurnitureAssemblyDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class FurnitureAssemblyDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
2024-05-05 20:11:20 +04:00
|
|
|
|
optionsBuilder.UseNpgsql("Host=localhost;Database=FurnitureAssemblyDatabaseFull;Username=postgres;Password=postgres");
|
2024-05-04 20:14:41 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Models.Workpiece> Workpieces { set; get; }
|
|
|
|
|
public virtual DbSet<Models.Furniture> Furnitures { set; get; }
|
|
|
|
|
public virtual DbSet<Models.FurnitureWorkpiece> FurnitureWorkpieces { set; get; }
|
|
|
|
|
public virtual DbSet<Models.Order> Orders { set; get; }
|
2024-05-05 20:11:20 +04:00
|
|
|
|
public virtual DbSet<Models.Client> Clients { set; get; }
|
2024-05-05 23:58:51 +04:00
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
2024-05-04 20:14:41 +04:00
|
|
|
|
}
|
|
|
|
|
}
|