2024-04-03 16:59:01 +04:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using SushiBarDatabaseImplement.Models;
|
|
|
|
|
|
|
|
|
|
namespace SushiBarDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class SushiBarDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-E2VPEN3\SQLEXPRESS;Initial Catalog=SushiBarDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Ingredient> Ingredients { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Sushi> ListSushi { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<SushiIngredient> SushiIngredients { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
2024-05-01 10:50:16 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2024-04-03 16:59:01 +04:00
|
|
|
|
}
|
|
|
|
|
}
|