PIbd_23_Kislitsa_E.D_Diner/Diner/DinerDataBaseImplement/DinerDatabase.cs

24 lines
984 B
C#
Raw Normal View History

2024-03-05 12:53:08 +04:00
using DinerDataBaseImplement.Models;
using Microsoft.EntityFrameworkCore;
namespace DinerDataBaseImplement
{
public class DinerDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
2024-04-29 23:14:37 +04:00
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=DinerDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
2024-03-05 12:53:08 +04:00
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Component> Components { set; get; }
public virtual DbSet<Snack> Snacks { set; get; }
public virtual DbSet<SnackComponent> SnackComponents { set; get; }
public virtual DbSet<Order> Orders { set; get; }
2024-04-02 14:15:39 +04:00
public virtual DbSet<Client> Clients { set; get; }
2024-04-16 12:55:18 +04:00
public virtual DbSet<Implementer> Implementers { set; get; }
2024-03-05 12:53:08 +04:00
}
}