ISEbd_21_Kuklew_M.I._Softwa.../SoftwareInstallationDatabaseImplement/SoftwareInstallationDataBase.cs
Максим Куклев 757c1ea0f0 загрузил
2024-05-12 14:45:39 +04:00

25 lines
1.0 KiB
C#

using SoftwareInstallationDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
namespace SoftwareInstallationDatabaseImplement
{
public class SoftwareInstallationDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
optionsBuilder.UseSqlServer(@"Data Source=LAPTOP-952S2NGN;Initial Catalog=SoftHard;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Component> Components { get; set; }
public virtual DbSet<Package> Packages { get; set; }
public virtual DbSet<PackageComponent> PackageComponents { get; set; }
public virtual DbSet<Order> Orders { get; set; }
public virtual DbSet<Shop> Shops { get; set; }
public virtual DbSet<ShopPackages> ShopPackages { get; set; }
}
}