PIbd-23_Mochalov_D.V._LawFirm/LawFirm/LawFirmDatabaseImplement/LawFirmDatabase.cs
2023-04-08 21:10:01 +04:00

32 lines
1.2 KiB
C#

using LawFirmDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LawFirmDatabaseImplement
{
public class LawFirmDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=DANYAXREN\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; }
public virtual DbSet<Shop> Shops { set; get; }
public virtual DbSet<ShopDocument> ShopDocuments { set; get; }
public virtual DbSet<Client> Clients { set; get; }
}
}