AccountingWarehouseProducts.../AccountingWarehouseProducts/AccountingWarehouseProductsDatabaseImplement/AccountingWarehouseProductsDatabase.cs

32 lines
1.3 KiB
C#
Raw Normal View History

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; }
}
}