PIbd-21_Markov_D.P._LawFirm/LawFirm/LawFirmDatabaseImplement/LawFirmDatabase.cs

30 lines
1.0 KiB
C#
Raw Normal View History

2023-03-13 19:57:35 +04:00
using LawFirmDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
namespace LawFirmDatabaseImplement
{
public class LawFirmDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseNpgsql(@"
Host=localhost;
Port=5432;
2023-05-02 22:25:24 +04:00
Database=RPPLab8;
2023-03-13 19:57:35 +04:00
Username=postgres;
Password=123");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Blank> Blanks { set; get; }
public virtual DbSet<Document> Documents { set; get; }
public virtual DbSet<DocumentBlank> DocumentBlanks { set; get; }
public virtual DbSet<Order> Orders { set; get; }
2023-03-28 01:05:56 +04:00
public virtual DbSet<Client> Clients { set; get; }
2023-04-25 00:17:59 +04:00
public virtual DbSet<Message> Messages { set; get; }
2023-04-11 00:22:09 +04:00
public virtual DbSet<Implementer> Implementers { set; get; }
}
2023-03-13 19:57:35 +04:00
}