27 lines
940 B
C#
27 lines
940 B
C#
using PlumbingRepairDatabaseImplement.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace PlumbingRepairDatabaseImplement
|
|
{
|
|
public class PlumbingRepairDatabase : DbContext
|
|
{
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
if (optionsBuilder.IsConfigured == false)
|
|
{
|
|
optionsBuilder.UseSqlServer(@"Server=localhost\SQLEXPRESS;Database=PlumbingRepair;Trusted_Connection=True;");
|
|
}
|
|
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; }
|
|
public virtual DbSet<Client> Clients { set; get; }
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
|
}
|
|
} |