2023-05-13 15:11:42 +04:00
|
|
|
|
using BeautySalonDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace BeautySalonDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class BeautySalonDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
2023-05-17 02:04:30 +04:00
|
|
|
|
optionsBuilder.UseNpgsql("Host=192.168.56.102;Port=5432;Database=BeautySalonDatabase;Username=postgres;Password=12345");
|
2023-05-13 15:11:42 +04:00
|
|
|
|
}
|
|
|
|
|
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; }
|
|
|
|
|
}
|
|
|
|
|
}
|