2024-05-01 01:07:59 +04:00
|
|
|
|
using BankDatabaseImplement.Models;
|
|
|
|
|
using DatabaseImplement.Models;
|
2024-04-30 23:53:53 +04:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace DatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class AutoShopDB : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseNpgsql(@"
|
|
|
|
|
Host=localhost;
|
|
|
|
|
Port=5432;
|
|
|
|
|
Database=AutoShopFullNew;
|
|
|
|
|
Username=postgres;
|
|
|
|
|
Password=55256636a;");
|
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2024-05-01 01:07:59 +04:00
|
|
|
|
public virtual DbSet<Order> Order { set; get; }
|
2024-04-30 23:53:53 +04:00
|
|
|
|
public virtual DbSet<OrderByPurchase> OrderByPurchases { set; get; }
|
|
|
|
|
public virtual DbSet<Employee> Employees { set; get; }
|
|
|
|
|
public virtual DbSet<Operation> Operations { set; get; }
|
|
|
|
|
public virtual DbSet<OperationByPurchase> OperationByPurchases { set; get; }
|
|
|
|
|
public virtual DbSet<Payment> Payments { set; get; }
|
|
|
|
|
public virtual DbSet<Purchase> Purchases { set; get; }
|
|
|
|
|
}
|
|
|
|
|
}
|