using FactoryDatabaseImplement.Models; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FactoryDatabaseImplement { public class FactoryDatabase : DbContext { protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (!optionsBuilder.IsConfigured) { optionsBuilder.UseSqlServer(); //todo привязывай данные } base.OnConfiguring(optionsBuilder); } public virtual DbSet Masters { set; get; } public virtual DbSet Engeniers { set; get; } public virtual DbSet Reinforceds { set; get; } public virtual DbSet Components { set; get; } public virtual DbSet ReinforcedComponents { set; get; } public virtual DbSet Lathes { set; get; } public virtual DbSet LatheBusies { set; get; } public virtual DbSet LatheReinforcedes { set; get; } public virtual DbSet Plans { set; get; } public virtual DbSet Stages { set; get; } public virtual DbSet PlanLathes { set; get; } public virtual DbSet PlanComponents { set; get; } } }