2024-03-14 18:53:30 +04:00
|
|
|
|
using CarRepairShopDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace CarRepairShopDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class RepairsShopDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
2024-03-25 21:16:58 +04:00
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=RepairsShopDataBaseHard;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"
|
2024-03-14 18:53:30 +04:00
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Component> Components { set; get; }
|
|
|
|
|
public virtual DbSet<Repair> Repairs { set; get; }
|
|
|
|
|
public virtual DbSet<RepairComponent> RepairComponents { set; get; }
|
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
2024-03-25 21:16:58 +04:00
|
|
|
|
public virtual DbSet<Shop> Shops { set; get; }
|
|
|
|
|
public virtual DbSet<ShopRepair> ShopRepairs { set; get; }
|
2024-04-06 19:58:28 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2024-03-14 18:53:30 +04:00
|
|
|
|
}
|
|
|
|
|
}
|