23 lines
945 B
C#
23 lines
945 B
C#
using BeautySalonDatabaseImplement.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace BeautySalonDatabaseImplement
|
|
{
|
|
public class BeautySalonDatabase : DbContext
|
|
{
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
if (optionsBuilder.IsConfigured == false)
|
|
{
|
|
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-IHH1ICP\SQLEXPRESS;Initial Catalog=BeautySalonDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
}
|
|
base.OnConfiguring(optionsBuilder);
|
|
}
|
|
public virtual DbSet<Master> Masters { set; get; }
|
|
public virtual DbSet<Service> Services { set; get; }
|
|
public virtual DbSet<MasterService> MasterServices { set; get; }
|
|
public virtual DbSet<Visit> Visits { set; get; }
|
|
public virtual DbSet<Client> Clients { set; get; }
|
|
}
|
|
}
|