From 26f7d9f44c2ed1f4a9ec3acd652fdf80bf2aae81 Mon Sep 17 00:00:00 2001 From: AnnZhimol Date: Fri, 7 Apr 2023 14:17:13 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SoftwareInstallationDataBase.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 SoftwareInstallation/SoftwareInstallationDataBaseImplement/SoftwareInstallationDataBase.cs 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