ISEbd_21_Kuklew_M.I._Softwa.../SoftwareInstallationDatabaseImplement/SoftwareInstallationDataBase.cs

32 lines
1.2 KiB
C#
Raw Permalink Normal View History

2024-04-07 17:40:43 +04:00
using Microsoft.EntityFrameworkCore;
using SoftwareInstallationDatabaseImplement.Models;
2024-04-07 17:24:16 +04:00
using System;
using System.Collections.Generic;
2024-04-07 17:40:43 +04:00
using System.Diagnostics;
2024-04-07 17:24:16 +04:00
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SoftwareInstallationDatabaseImplement
2024-04-07 17:40:43 +04:00
{
2024-04-07 17:24:16 +04:00
public class SoftwareInstallationDataBase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder
optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
2024-05-19 10:10:11 +04:00
optionsBuilder.UseSqlServer(@"Data Source=LAPTOP-952S2NGN;Initial Catalog=SS;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
2024-04-07 17:24:16 +04:00
}
base.OnConfiguring(optionsBuilder);
}
2024-04-07 17:40:43 +04:00
public virtual DbSet<Component> Components { set; get; }
public virtual DbSet<Software> Softwares { set; get; }
public virtual DbSet<PackageComponent> SoftwareComponents { set; get; }
2024-04-07 17:24:16 +04:00
public virtual DbSet<Order> Orders { set; get; }
2024-05-11 21:16:59 +04:00
public virtual DbSet<Client> Clients { set; get; }
2024-05-11 21:30:00 +04:00
public virtual DbSet<Implementer> Implementers { set; get; }
2024-05-19 10:10:11 +04:00
public virtual DbSet<MessageInfo> Messages { set; get; }
}
2024-04-07 17:24:16 +04:00
}