2024-03-09 21:37:08 +04:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using SushiBarDatabaseImplement.Models;
|
|
|
|
|
|
|
|
|
|
namespace SushiBarDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class SushiBarDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
2024-03-10 14:16:51 +04:00
|
|
|
|
|
2024-03-29 12:44:11 +04:00
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;
|
2024-03-10 14:16:51 +04:00
|
|
|
|
Initial Catalog=SushiBarDatabase;
|
|
|
|
|
Integrated Security=True;
|
|
|
|
|
MultipleActiveResultSets=True;;
|
|
|
|
|
TrustServerCertificate=True"
|
2024-03-09 21:37:08 +04:00
|
|
|
|
);
|
2024-03-10 14:16:51 +04:00
|
|
|
|
|
2024-03-09 21:37:08 +04:00
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Component> Components { set; get; }
|
|
|
|
|
public virtual DbSet<Sushi> Sushis { set; get; }
|
|
|
|
|
public virtual DbSet<SushiComponent> SushiComponents { set; get; }
|
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
2024-04-06 15:55:02 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2024-04-20 18:25:24 +04:00
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
2024-03-09 21:37:08 +04:00
|
|
|
|
}
|
|
|
|
|
}
|