2023-04-06 17:00:40 +04:00
|
|
|
|
using ComputerStoreDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ComputerStoreDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class ComputerStoreDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
2023-05-17 18:34:28 +04:00
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=YUEEJKE\SQLEXPRESS;Initial Catalog=ComputerStoreDatabase;Integrated Security=True;MultipleActiveResultSets=True;TrustServerCertificate=True");
|
2023-04-06 17:00:40 +04:00
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Component> Components { get; set; }
|
|
|
|
|
public virtual DbSet<Product> Products { get; set; }
|
2023-05-19 02:32:15 +04:00
|
|
|
|
public virtual DbSet<PC> PCS { get; set; }
|
2023-04-06 17:00:40 +04:00
|
|
|
|
public virtual DbSet<Employee> Employees { get; set; }
|
|
|
|
|
public virtual DbSet<RequestComponent> RequestComponents { get; set; }
|
2023-04-07 21:49:30 +04:00
|
|
|
|
public virtual DbSet<ProductComponent> ProductComponents { get; set; }
|
2023-04-09 01:07:38 +04:00
|
|
|
|
public virtual DbSet<ConsignmentProduct> ConsignmentProducts { get; set; }
|
|
|
|
|
public virtual DbSet<Consignment> Consignments { get; set; }
|
|
|
|
|
public virtual DbSet<Order> Orders { get; set; }
|
|
|
|
|
public virtual DbSet<Request> Requests { get; set; }
|
|
|
|
|
public virtual DbSet<Seller> Sellers { get; set; }
|
2023-04-06 17:00:40 +04:00
|
|
|
|
}
|
|
|
|
|
}
|