2023-04-07 02:35:51 +04:00
|
|
|
|
using BankDatabase.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
2023-04-07 02:35:27 +04:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace BankDatabase
|
|
|
|
|
{
|
2023-04-07 02:35:51 +04:00
|
|
|
|
public class BankDbContext : DbContext
|
2023-04-07 02:35:27 +04:00
|
|
|
|
{
|
2023-04-07 02:35:51 +04:00
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlServer
|
|
|
|
|
(
|
|
|
|
|
@"БАЗУ ДАННЫХ ДОБАВЬ ГЕНИЙ"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Client> Clients { get; set; }
|
|
|
|
|
public virtual DbSet<Deal> Deals { get; set; }
|
|
|
|
|
public virtual DbSet<Expenses> Expensess { get; set; }
|
|
|
|
|
public virtual DbSet<ExpensesForDeal> ExpensesForDeals { get; set; }
|
|
|
|
|
public virtual DbSet<Operations> Operationss { get; set; }
|
|
|
|
|
public virtual DbSet<OperationsInDeal> OperationsInDeals { get; set; }
|
|
|
|
|
public virtual DbSet<Worker> Workers { get; set; }
|
|
|
|
|
public virtual DbSet<Payment> Payments { get; set; }
|
2023-04-07 02:35:27 +04:00
|
|
|
|
}
|
|
|
|
|
}
|