PIbd22_NikiforovaMV_Automob.../AutomobilePlantDatabaseImplement/AutomobilePlantDatabase.cs

32 lines
1.2 KiB
C#
Raw Permalink Normal View History

2024-05-11 13:35:30 +04:00
using AutomobilePlantDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
namespace AutomobilePlantDatabaseImplement
{
public class AutomobilePlantDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
2024-06-22 22:32:20 +04:00
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-50UQ1O1\MSSQLSERVER01;Initial Catalog=AutomobilePlantWorkDatabase1;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
2024-05-11 13:35:30 +04:00
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Component> Components { set; get; }
public virtual DbSet<Car> Cars { set; get; }
public virtual DbSet<CarComponent> CarComponents { set; get; }
public virtual DbSet<Order> Orders { set; get; }
2024-06-22 22:23:42 +04:00
public virtual DbSet<Client> Clients { set; get; }
2024-06-22 22:27:59 +04:00
public virtual DbSet<Implementer> Implementers { set; get; }
2024-06-22 22:30:26 +04:00
public virtual DbSet<MessageInfo> Messages { set; get; }
}
2024-05-11 13:35:30 +04:00
}