ISEbd-21_KashtanovD.A.FishF.../FishFactory/FishFactoryDatabaseImplement/FishFactoryDatabase.cs

25 lines
1020 B
C#
Raw Normal View History

2024-03-21 19:57:29 +04:00
using FishFactoryDatabaseImplement.Models;
using Microsoft.EntityFrameworkCore;
2024-04-26 00:17:50 +04:00
2024-03-21 19:57:29 +04:00
namespace FishFactoryDatabaseImplement
{
public class FishFactoryDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder
optionsBuilder)
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-CLVTSDS\SQLEXPRESS;Initial Catalog=FishFactoryDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}
public virtual DbSet<Component> Components { set; get; }
public virtual DbSet<Canned> Canneds { set; get; }
public virtual DbSet<CannedComponent> CannedComponents { set; get; }
public virtual DbSet<Order> Orders { set; get; }
2024-04-26 00:17:50 +04:00
public virtual DbSet<Client> Clients { set; get; }
2024-04-30 22:57:42 +04:00
public virtual DbSet<Implementer> Implementers { set; get; }
}
2024-03-21 19:57:29 +04:00
}