PIbd-21_Markov_D.P._LawFirm/LawFirm/LawFirmDatabaseImplement/LawFirmDatabase.cs
2023-03-13 19:57:35 +04:00

28 lines
883 B
C#

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;
Database=RPP;
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; }
}
}