30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using ZooDatabaseImplements.Models;
|
|
using System.Collections.Generic;
|
|
using ZooDatabaseImplements.Models;
|
|
|
|
namespace ZooDatabaseImplements
|
|
{
|
|
public class ZooDatabase : DbContext
|
|
{
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
if (optionsBuilder.IsConfigured == false)
|
|
{
|
|
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-SGV83FN\SQLEXPRESS;Database=SchoolDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
}
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
}
|
|
public virtual DbSet<Client> Clients { set; get; }
|
|
public virtual DbSet<RouteReserve> RouteReserves { set; get; }
|
|
public virtual DbSet<Employee> Employees { set; get; }
|
|
public virtual DbSet<Payment> Payments { set; get; }
|
|
public virtual DbSet<Cost> Costs { set; get; }
|
|
public virtual DbSet<Route> Routes { set; get; }
|
|
public virtual DbSet<Reserve> Reserves { set; get; }
|
|
public virtual DbSet<RouteCost> RouteCosts { set; get; }
|
|
}
|
|
}
|
|
}
|