2023-03-26 15:40:54 +04:00
|
|
|
|
using ComputerShopDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ComputerShopDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
internal class ComputerShopDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-IRUVF5S\SQLEXPRESS;Initial Catalog=ComputerShopDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Component> Components { set; get; }
|
|
|
|
|
public virtual DbSet<Computer> Computers { set; get; }
|
|
|
|
|
public virtual DbSet<ComputerComponent> ComputerComponents { set; get; }
|
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
2023-04-07 10:31:55 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2023-04-19 15:46:04 +04:00
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
2023-04-20 23:04:13 +04:00
|
|
|
|
public virtual DbSet<MessageInfo> Messages { set; get; }
|
2023-03-26 15:40:54 +04:00
|
|
|
|
}
|
|
|
|
|
}
|