ISEbd_21_Kuklew_M.I._Softwa.../SoftwareInstallationDatabaseImplement/SoftwareInstallationDataBase.cs
Максим Куклев 58b5d60452 загрузил
2024-05-19 10:10:11 +04:00

32 lines
1.2 KiB
C#

using Microsoft.EntityFrameworkCore;
using SoftwareInstallationDatabaseImplement.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoftwareInstallationDatabaseImplement
{
public class SoftwareInstallationDataBase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder
optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=LAPTOP-952S2NGN;Initial Catalog=SS;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Component> Components { set; get; }
public virtual DbSet<Software> Softwares { set; get; }
public virtual DbSet<PackageComponent> SoftwareComponents { 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; }
}
}