Pibd-21_Ievlewa_MD._Precast.../PrecastConcretePlant/PrecastConcretePlantDatabaseImplement/PrecastConcretePlantDatabase.cs

30 lines
1.2 KiB
C#
Raw Normal View History

2024-04-04 21:21:21 +04:00
using Microsoft.EntityFrameworkCore;
2024-05-17 00:03:34 +04:00
using PrecastConcretePlantDataBaseImplement.Models;
2024-04-04 21:21:21 +04:00
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2024-05-17 00:03:34 +04:00
namespace PrecastConcretePlantDataBaseImplement
2024-04-04 21:21:21 +04:00
{
public class PrecastConcretePlantDataBase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
2024-05-17 00:03:34 +04:00
optionsBuilder.UseSqlServer(@"Data Source=PRETTYNAME;Initial Catalog=PrecastConcretePlantDataBaseHard;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
2024-04-04 21:21:21 +04:00
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Component> Components { set; get; }
public virtual DbSet<Reinforced> Reinforceds { set; get; }
public virtual DbSet<ReinforcedComponent> ReinforcedComponents { set; get; }
public virtual DbSet<Order> Orders { set; get; }
2024-05-17 00:03:34 +04:00
public virtual DbSet<Shop> Shops { set; get; }
public virtual DbSet<ShopReinforced> ShopReinforceds { set; get; }
2024-04-04 21:21:21 +04:00
}
}