using BankDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BankDatabaseImplement
{
    public class BankDatabase : DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (optionsBuilder.IsConfigured == false)
            {
                optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=BankDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
            }
            base.OnConfiguring(optionsBuilder);
        }
        public virtual DbSet<Operator> Operators { set; get; }
        public virtual DbSet<Deal> Deals { set; get; }
        public virtual DbSet<Payment> Payments { set; get; }
        public virtual DbSet<Transfer> Transfers { set; get; }
        public virtual DbSet<DealPayment> DealPayments { set; get; }
        public virtual DbSet<CurrencyPayment> CurrencyPayments { set; get; }

    }
}
