28 lines
810 B
C#
Raw Normal View History

2023-10-21 00:15:53 +04:00
using DatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DatabaseImplement
{
public class ElegevContext : DbContext
{
public DbSet<LabWork> LabWorks { get; set; }
public DbSet<Discipline> Disciplines { get; set; }
2023-10-21 00:15:53 +04:00
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=MSI-B17;Initial Catalog=ElegevContext;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
2023-10-21 00:15:53 +04:00
base.OnConfiguring(optionsBuilder);
}
}
}