using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CarRepairShopDatabaseImplement.Models; using Microsoft.EntityFrameworkCore; namespace CarRepairShopDatabaseImplement { public class CarRepairShopDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if(optionsBuilder.IsConfigured == false) { optionsBuilder.UseSqlServer(@"Data Source=.\SQLEXPRESS;Initial Catalog=CarRepairShopDatabase;Integrated Security=True;MultipleActiveResultSets=True;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); } public virtual DbSet Components { get; set; } public virtual DbSet Repairs { get; set; } public virtual DbSet RepairComponents { get; set; } public virtual DbSet Orders { get; set; } public virtual DbSet Clients { get; set; } public virtual DbSet Implementers { get; set; } } }