PIbd-23_Dolgov_D.A._Softwar.../SoftwareInstallation/AbstractSoftwareInstallationDatabaseImplement/AbstractSoftwareInstallationDatabase.cs
2023-09-08 08:44:01 +04:00

32 lines
1.3 KiB
C#

using AbstractPackageInstallationDatabaseImplement.Models;
using AbstractSoftwareInstallationDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AbstractSoftwareInstallationDatabaseImplement
{
public class AbstractSoftwareInstallationDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder
optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=DANYAXREN\SQLEXPRESS;Initial Catalog=SoftwareInstallation1;Integrated Security=True;MultipleActiveResultSets=True;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Software> Softwares { set; get; }
public virtual DbSet<Package> Packages { set; get; }
public virtual DbSet<PackageSoftware> PackageSoftwares { set; get; }
public virtual DbSet<Order> Orders { set; get; }
public virtual DbSet<Client> Clients { set; get; }
public virtual DbSet<Implementer> Implementers { set; get; }
public virtual DbSet<MessageInfo> Messages { set; get; }
}
}