PIbd-21_RazubaevSM_Plumbing.../PlumbingRepair/PlumbingRepairDatabaseImplement/PlumbingRepairDatabase.cs
2024-05-11 20:41:59 +04:00

37 lines
1.2 KiB
C#

using PlumbingRepairDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
namespace PlumbingRepairDatabaseImplement
{
public class PlumbingRepairDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
<<<<<<< HEAD
optionsBuilder.UseSqlServer(@"Server=localhost\SQLEXPRESS;Database=PlumbingRepairHard;Trusted_Connection=True;");
=======
optionsBuilder.UseSqlServer(@"Server=localhost\SQLEXPRESS;Database=PlumbingRepair;Trusted_Connection=True;");
>>>>>>> lab_5
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Component> Components { set; get; }
public virtual DbSet<Work> Works { set; get; }
public virtual DbSet<WorkComponent> WorkComponents { set; get; }
public virtual DbSet<Order> Orders { set; get; }
<<<<<<< HEAD
public virtual DbSet<Shop> Shops { set; get; }
public virtual DbSet<ShopWork> ShopWorks { set; get; }
=======
public virtual DbSet<Client> Clients { set; get; }
>>>>>>> lab_5
}
}