30 lines
1012 B
C#
30 lines
1012 B
C#
using BeautySaloonDatabaseImplement.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace BeautySaloonDatabaseImplement
|
|
{
|
|
public class BeautySaloonDatabase : DbContext
|
|
{
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
if (optionsBuilder.IsConfigured == false)
|
|
{
|
|
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-D8KMQQU\SQLEXPRESS;Initial Catalog=SushiBarDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
}
|
|
base.OnConfiguring(optionsBuilder);
|
|
}
|
|
|
|
public virtual DbSet<Employee> Employees { set; get; }
|
|
|
|
public virtual DbSet<Position> Positions { set; get; }
|
|
|
|
public virtual DbSet<Service> Services { set; get; }
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
|
|
|
public virtual DbSet<ServiceOrder> OrderServices { set; get; }
|
|
}
|
|
}
|