2024-03-27 11:02:14 +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)
|
|
|
|
|
{
|
2024-05-22 10:14:48 +04:00
|
|
|
|
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=WIN-N21FHIN3LLR\SQLEXPRESS;Initial Catalog=FurnitureAssemblyDatabase2;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
2024-03-27 11:02:14 +04:00
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
2024-05-22 02:16:26 +04:00
|
|
|
|
|
2024-03-27 11:02:14 +04:00
|
|
|
|
public virtual DbSet<WorkPiece> WorkPieces { set; get; }
|
2024-05-22 02:16:26 +04:00
|
|
|
|
|
2024-03-27 11:02:14 +04:00
|
|
|
|
public virtual DbSet<Furniture> Furnitures { set; get; }
|
2024-05-22 02:16:26 +04:00
|
|
|
|
|
2024-03-27 11:02:14 +04:00
|
|
|
|
public virtual DbSet<FurnitureWorkPiece> FurnitureWorkPieces { set; get; }
|
2024-05-22 02:16:26 +04:00
|
|
|
|
|
2024-03-27 11:02:14 +04:00
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
2024-05-22 02:16:26 +04:00
|
|
|
|
|
2024-05-13 23:32:57 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2024-03-27 11:02:14 +04:00
|
|
|
|
}
|
|
|
|
|
}
|