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

31 lines
1.2 KiB
C#
Raw Normal View History

2024-04-04 21:21:21 +04:00
using Microsoft.EntityFrameworkCore;
using PrecastConcretePlantDatabaseImplement.Models;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PrecastConcretePlantDatabaseImplement
{
2024-05-02 20:47:10 +04:00
public class PrecastConcretePlantDatabase : DbContext
2024-04-04 21:21:21 +04:00
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=PRETTYNAME;Initial Catalog=PrecastConcretePlantDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
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-04-18 20:50:43 +04:00
public virtual DbSet<Client> Clients { set; get; }
2024-05-02 20:47:10 +04:00
public virtual DbSet<Implementer> Implementers { set; get; }
2024-05-03 01:02:06 +04:00
public virtual DbSet<MessageInfo> Messages { set; get; }
2024-05-02 20:47:10 +04:00
}
2024-04-04 21:21:21 +04:00
}