PIbd-23_Leonteva_V._A._LawFirm/LawFirm/LawFirmDatabaseImplement/LawFirmDatabase.cs

21 lines
864 B
C#
Raw Normal View History

2024-04-23 12:07:00 +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.UseSqlServer(@"Data Source=localhost\SQLEXPRESS; Initial Catalog=LawFirmDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
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; }
}
}