Gismatullin.ISEbd-21.STO.Co.../ServiceStation/ServiceStationsDataBaseImplement/DataBase.cs

29 lines
1.1 KiB
C#
Raw Normal View History

2024-04-30 18:44:37 +04:00
using Microsoft.EntityFrameworkCore;
2024-04-30 20:55:37 +04:00
using ServiceStationsDataBaseImplement.Implements;
2024-04-30 18:44:37 +04:00
using ServiceStationsDataBaseImplement.Models;
using System.Collections.Generic;
using System.Data;
namespace ServiceStationsDataBaseImplement
{
public class Database : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder
optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-E2VPEN3\SQLEXPRESS;Initial Catalog=ElectronicsShopDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Client> Clients { set; get; }
2024-04-30 20:55:37 +04:00
public virtual DbSet<CategoryWork> CategoryWorks { set; get; }
public virtual DbSet<ClientWork> ClientsWorks { set; get; }
public virtual DbSet<Executor> Executors { set; get; }
public virtual DbSet<Report> Reports { set; get; }
public virtual DbSet<Work> Works { set; get; }
2024-04-30 18:44:37 +04:00
}
}