32 lines
1.3 KiB
C#
32 lines
1.3 KiB
C#
|
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; }
|
|||
|
public virtual DbSet<OrderProduct> OrderProducts { get; set; }
|
|||
|
public virtual DbSet<WarehouseProduct> WarehouseProducts { get; set; }
|
|||
|
}
|
|||
|
}
|