40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using TravelAgencyDatabaseImplement.Models;
|
|
|
|
namespace TravelAgencyDatabaseImplement
|
|
{
|
|
public class TravelAgencyDatabase : DbContext
|
|
{
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
if (optionsBuilder.IsConfigured == false)
|
|
{
|
|
optionsBuilder.UseSqlServer(@"Data Source=.\SQLEXPRESS;Initial Catalog=TravelAgencyDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
}
|
|
base.OnConfiguring(optionsBuilder);
|
|
}
|
|
|
|
public virtual DbSet<Excursion> Excursions { set; get; }
|
|
|
|
public virtual DbSet<ExcursionGroup> ExcursionGroups { set; get; }
|
|
|
|
public virtual DbSet<Tour> Tours { set; get; }
|
|
|
|
public virtual DbSet<ExcursionTour> ExcursionTours { set; get; }
|
|
|
|
public virtual DbSet<ExcursionGroupTour> ExcursionGroupTours { set; get; }
|
|
|
|
public virtual DbSet<ExcursionGroupPlace> ExcursionGroupPlaces { set; get; }
|
|
|
|
public virtual DbSet<Guide> Guides { set; get; }
|
|
|
|
public virtual DbSet<Place> Places { set; get; }
|
|
|
|
public virtual DbSet<User> Users { set; get; }
|
|
|
|
public virtual DbSet<Trip> Trips { set; get; }
|
|
|
|
public virtual DbSet<TripPlace> TripPlaces { set; get; }
|
|
}
|
|
}
|