Zhimolostnova A.V. Hard lab work 3 #10

Closed
AnnZhimol wants to merge 6 commits from LabRab_3_Hard into LabRab_2_Hard
Showing only changes of commit 26f7d9f44c - Show all commits

View File

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore;
using SoftwareInstallationDataBaseImplement.Models;
namespace SoftwareInstallationDataBaseImplement
{
public class SoftwareInstallationDataBase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-VG5USAH\SQLEXPRESS;Initial Catalog=SoftwareInstallationDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Component> Components { set; get; }
public virtual DbSet<Package> Packages { set; get; }
public virtual DbSet<PackageComponent> PackageComponents { set; get; }
public virtual DbSet<Order> Orders { set; get; }
public virtual DbSet<Client> Clients { set; get; }
}
}