diff --git a/SoftwareInstallation/SoftwareInstallationDataBaseImplement/SoftwareInstallationDataBase.cs b/SoftwareInstallation/SoftwareInstallationDataBaseImplement/SoftwareInstallationDataBase.cs new file mode 100644 index 0000000..5c91f65 --- /dev/null +++ b/SoftwareInstallation/SoftwareInstallationDataBaseImplement/SoftwareInstallationDataBase.cs @@ -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 Components { set; get; } + public virtual DbSet Packages { set; get; } + public virtual DbSet PackageComponents { set; get; } + public virtual DbSet Orders { set; get; } + public virtual DbSet Clients { set; get; } + } +} \ No newline at end of file