using CarCenterDataBaseImplement.Models;
using Microsoft.EntityFrameworkCore;

namespace CarCenterDataBaseImplement
{
    public class CarCenterDataBase : DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (optionsBuilder.IsConfigured == false)
            {
                optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=CarCenterDataBase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
            }

            base.OnConfiguring(optionsBuilder);
        }
        public virtual DbSet<Employee> Employees { set; get; }
        public virtual DbSet<Equipment> Equipments { set; get; }
        public virtual DbSet<PreSaleWork> PreSaleWorks { set; get; }
        public virtual DbSet<Inspection> Inspections { set; get; }
        public virtual DbSet<Sale> Sales { set; get; }
        public virtual DbSet<Car> Cars { set; get; }
        public virtual DbSet<Manager> Managers { set; get; }
        public virtual DbSet<Administrator> Administrators { set; get; }
        public virtual DbSet<EmployeeSale> EmployeeSales { set; get; }
        public virtual DbSet<EquipmentCar> EquipmentCars { set; get; }
        public virtual DbSet<PreSaleWorkSale> PreSaleWorkSales { set; get; }
        public virtual DbSet<InspectionCar> InspectionCars { set; get; }

    }
}