ISEbd-21.Gordeev.I.V.SushiB.../SushiBar/SushiBarDatabaseImplement/SushiBarDatabase.cs

29 lines
1.1 KiB
C#
Raw Permalink Normal View History

2024-04-03 16:59:01 +04:00
using Microsoft.EntityFrameworkCore;
using SushiBarDatabaseImplement.Models;
2024-05-12 19:04:40 +04:00
using SushiBarDataModels.Models;
2024-04-03 16:59:01 +04:00
namespace SushiBarDatabaseImplement
{
public class SushiBarDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
2024-05-16 18:55:15 +04:00
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-E2VPEN3\SQLEXPRESS;Initial Catalog=SushiBarDatabaseTest;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
2024-04-03 16:59:01 +04:00
}
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-05-12 19:04:40 +04:00
public virtual DbSet<Implementer> Implementers { set; get; }
2024-05-16 18:55:15 +04:00
public virtual DbSet<MessageInfo> Messages { set; get; }
}
2024-04-03 16:59:01 +04:00
}