2024-03-26 18:50:50 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using AircraftPlantDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace AircraftPlantDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class AircraftPlantDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
2024-03-26 21:23:10 +04:00
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-6QDRI0N\SQLEXPRESS;Initial Catalog=AircraftPlantDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
2024-03-26 18:50:50 +04:00
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Component> Components { set; get; }
|
|
|
|
|
public virtual DbSet<Plane> Planes { set; get; }
|
|
|
|
|
public virtual DbSet<PlaneComponent> PlaneComponents { set; get; }
|
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
2024-06-21 13:48:15 +04:00
|
|
|
|
public virtual DbSet<Shop> Shops { set; get; }
|
|
|
|
|
public virtual DbSet<ShopPlane> ShopPlanes { set; get; }
|
2024-03-26 18:50:50 +04:00
|
|
|
|
}
|
|
|
|
|
}
|