2024-04-21 19:17:40 +04:00
|
|
|
|
using AccountingWarehouseProductsDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace AccountingWarehouseProductsDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class AccountingWarehouseProductsDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=.\SQLEXPRESS;Initial Catalog=AccountingWarehouseProductsDatabase;Integrated Security=True;MultipleActiveResultSets=True;TrustServerCertificate=True");
|
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Supplier> Suppliers { get; set; }
|
|
|
|
|
public virtual DbSet<Warehouse> Warehouses { get; set; }
|
|
|
|
|
public virtual DbSet<Product> Products { get; set; }
|
|
|
|
|
public virtual DbSet<Shipment> Shipments { get; set; }
|
|
|
|
|
public virtual DbSet<Stand> Stands { get; set; }
|
|
|
|
|
public virtual DbSet<Order> Orders { get; set; }
|
2024-05-01 22:21:11 +04:00
|
|
|
|
public virtual DbSet<OrderProduct> OrderProduct { get; set; }
|
|
|
|
|
public virtual DbSet<WarehouseProduct> WarehouseProduct { get; set; }
|
2024-04-21 19:17:40 +04:00
|
|
|
|
}
|
|
|
|
|
}
|