2024-03-24 13:58:43 +04:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using ShipyardDataBaseImplement.Models;
|
|
|
|
|
|
|
|
|
|
namespace ShipyardDataBaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class ShipyardDataBase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-JJTVLCG\SQLEXPRESS02;Initial Catalog=ShipyardDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Detail> Details { set; get; }
|
|
|
|
|
public virtual DbSet<Ship> Ships { set; get; }
|
|
|
|
|
public virtual DbSet<ShipDetail> ShipDetails { set; get; }
|
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
2024-04-05 13:29:30 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2024-04-21 20:39:51 +04:00
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
|
|
|
|
}
|
2024-03-24 13:58:43 +04:00
|
|
|
|
|
|
|
|
|
}
|