ISEbd-21_Kadyrov_A.F._Afana.../Bank/BankDatabase/BankDbContext.cs

34 lines
1.2 KiB
C#

using BankDatabase.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BankDatabase
{
public class BankDbContext : DbContext
{
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; }
}
}