34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using FurnitureAssemblyDatabaseImplement.Models;
|
|
using FurnitureAssemblyListImplement.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)
|
|
{
|
|
optionsBuilder.UseNpgsql("Host=10.211.55.3;Database=FurnitureAssemblyDatabaseFull;Username=postgres;Password=postgres");
|
|
}
|
|
|
|
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; }
|
|
}
|
|
}
|