2024-03-04 19:46:39 +04:00
|
|
|
|
using IceCreamShopDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace IceCreamShopDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class IceCreamShopDataBase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder
|
|
|
|
|
optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=IceCreamShopDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Models.Component> Components { set; get; }
|
|
|
|
|
public virtual DbSet<IceCream> IceCreams { set; get; }
|
|
|
|
|
public virtual DbSet<IceCreamComponent> IceCreamComponents { set; get; }
|
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
2024-04-01 20:04:44 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2024-04-15 15:25:51 +04:00
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
2024-04-29 18:33:41 +04:00
|
|
|
|
public virtual DbSet<MessageInfo> Messages { set; get; }
|
|
|
|
|
|
2024-03-04 19:46:39 +04:00
|
|
|
|
|
2024-04-15 15:25:51 +04:00
|
|
|
|
}
|
2024-03-04 19:46:39 +04:00
|
|
|
|
}
|