2024-03-23 21:01:40 +04:00
|
|
|
|
using PlumbingRepairDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace PlumbingRepairDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class PlumbingRepairDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
2024-04-19 18:36:30 +04:00
|
|
|
|
optionsBuilder.UseSqlServer(@"Server=localhost\SQLEXPRESS;Database=PlumbingRepairHard;Trusted_Connection=True;");
|
2024-03-23 21:01:40 +04:00
|
|
|
|
}
|
|
|
|
|
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; }
|
2024-04-19 18:36:30 +04:00
|
|
|
|
|
|
|
|
|
public virtual DbSet<Shop> Shops { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<ShopWork> ShopWorks { set; get; }
|
2024-04-12 19:30:31 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2024-04-19 18:02:08 +04:00
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
2024-05-02 22:08:35 +04:00
|
|
|
|
public virtual DbSet<MessageInfo> Messages { set; get; }
|
2024-03-23 21:01:40 +04:00
|
|
|
|
}
|
|
|
|
|
}
|