2024-05-07 17:56:47 +04:00
|
|
|
|
using SecuritySystemDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace SecuritySystemDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class SecuritySystemDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=WIN-GKU3FFNUNO6;Initial Catalog=SecuritySystemDatabase;Integrated Security=True;MultipleActiveResultSets=True;TrustServerCertificate=True");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Sensor> Sensors { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Secure> Secures { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<SecureSensor> SecureSensors { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
2024-05-08 08:03:51 +04:00
|
|
|
|
|
|
|
|
|
public virtual DbSet<Client> Clients { get; set; }
|
2024-05-08 08:37:10 +04:00
|
|
|
|
|
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
2024-05-07 17:56:47 +04:00
|
|
|
|
}
|
|
|
|
|
}
|