using LawCompanyContracts.BindingModels; using LawCompanyDatabaseImplement.Models; using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LawCompanyDatabaseImplement { public class LawCompanyDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { //optionsBuilder.UseSqlServer(@"Data Source=LAPTOP-6GNIALH9\SQLEXPRESS;Initial Catalog=LawCompanyDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-H8060U3\SQLEXPRESS;Initial Catalog=LawCompanyDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Cases { set; get; } public virtual DbSet CaseClients { set; get; } public virtual DbSet Clients { set; get; } public virtual DbSet Hearings { set; get; } public virtual DbSet HearingLawyers { set; get; } public virtual DbSet Lawyers { set; get; } public virtual DbSet Visits { set; get; } public virtual DbSet VisitClients { set; get; } public virtual DbSet Consultations { set; get; } public virtual DbSet ConsultationLawyers { set; get; } public virtual DbSet Guarantors { set; get; } public virtual DbSet Executors { set; get; } } }