2023-03-06 10:20:01 +04:00
|
|
|
|
using ConfectioneryDataBaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ConfectioneryDataBaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class ConfectioneryDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=ConfectioneryDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Ingredient> Ingredients { set; get; }
|
|
|
|
|
public virtual DbSet<Pastry> Pastrys { set; get; }
|
|
|
|
|
public virtual DbSet<PastryIngredient> PastryIngredients { set; get; }
|
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
2023-04-03 10:49:52 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2023-04-27 22:54:15 +04:00
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
2023-04-28 08:35:50 +04:00
|
|
|
|
public virtual DbSet<MessageInfo> MessageInfos { set; get; }
|
2023-03-06 10:20:01 +04:00
|
|
|
|
}
|
|
|
|
|
}
|