30 lines
1.0 KiB
C#
30 lines
1.0 KiB
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=RPPLab7OneMore;
|
|
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; }
|
|
public virtual DbSet<Client> Clients { set; get; }
|
|
public virtual DbSet<Message> Messages { set; get; }
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
|
}
|
|
}
|