2024-03-22 09:14:00 +04:00
|
|
|
|
using DinerDataBaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace DinerDataBaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class DinerDataBase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {
|
|
|
|
|
if (optionsBuilder.IsConfigured == false) {
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-O0N00SH\SQLEXPRESS;Initial Catalog=DinerDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Food> Components { get; set; }
|
2024-05-11 22:14:52 +04:00
|
|
|
|
public virtual DbSet<Snack> Snacks { get; set; }
|
2024-03-22 09:14:00 +04:00
|
|
|
|
public virtual DbSet<SnackFood> ProductComponents { get; set; }
|
|
|
|
|
public virtual DbSet<Order> Orders { get; set; }
|
2024-05-01 21:05:07 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { get; set; }
|
2024-03-22 09:14:00 +04:00
|
|
|
|
}
|
|
|
|
|
}
|