using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.SqlServer; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using DatabaseImplement; namespace STODatabaseImplement { public class STODatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=STODataBase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Clients { set; get; } public virtual DbSet TechnicalWorks { set; get; } public virtual DbSet Cars { set; get; } public virtual DbSet Services { set; get; } public virtual DbSet CarParts { set; get; } public virtual DbSet Works { set; get; } //public virtual DbSet CarPartCar { set; get; } public virtual DbSet CarPartWork { set; get; } public virtual DbSet CarTechnicalWork { set; get; } public virtual DbSet WorkTechnicalWork { set; get; } } }