2023-02-26 22:01:55 +04:00
|
|
|
|
using FurnitureAssemblyDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
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)
|
|
|
|
|
{
|
2023-04-18 16:56:38 +04:00
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=zhu\SQLEXPRESS;Initial Catalog=FurnitureAssemblyDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
2023-02-26 22:01:55 +04:00
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Component> Components { set; get; }
|
|
|
|
|
public virtual DbSet<Furniture> Furnitures { set; get; }
|
|
|
|
|
public virtual DbSet<FurnitureComponent> FurnitureComponents { set; get; }
|
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
2023-03-25 10:30:54 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2023-04-09 09:41:20 +04:00
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
2023-02-26 22:01:55 +04:00
|
|
|
|
}
|
|
|
|
|
}
|