2023-03-20 08:43:09 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using TravelCompanyDatabaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace TravelCompanyDatabaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class TravelCompanyDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
2023-05-27 12:20:39 +04:00
|
|
|
|
optionsBuilder.UseSqlServer(@"Data Source=localhost\SQLEXPRESS;Initial Catalog=TravelCompanyDatabaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
2023-03-20 08:43:09 +04:00
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
public virtual DbSet<Condition> Conditions { set; get; }
|
|
|
|
|
public virtual DbSet<Travel> Travels { set; get; }
|
|
|
|
|
public virtual DbSet<TravelCondition> TravelConditions { set; get; }
|
|
|
|
|
public virtual DbSet<Order> Orders { set; get; }
|
2023-04-28 00:02:22 +04:00
|
|
|
|
public virtual DbSet<Client> Clients { set; get; }
|
2023-04-28 08:35:07 +04:00
|
|
|
|
public virtual DbSet<Implementer> Implementers { set; get; }
|
2023-06-03 00:30:53 +04:00
|
|
|
|
public virtual DbSet<MessageInfo> MessageInfos { set; get; }
|
2023-03-20 08:43:09 +04:00
|
|
|
|
}
|
|
|
|
|
}
|