31 lines
1.1 KiB
C#
31 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using AutoCenterDatabaseImplement.Models;
|
|
|
|
namespace AutoCenterDatabaseImplement
|
|
{
|
|
public class AutoCenterDatabase : DbContext
|
|
{
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
if (optionsBuilder.IsConfigured == false)
|
|
{
|
|
optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-K0U29OV;Initial Catalog=AutoCenter;Integrated Security=True;MultipleActiveResultSets=True;TrustServerCertificate=True");
|
|
}
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
}
|
|
|
|
public virtual DbSet<PresellingWork> PresellingWorks { get; set; }
|
|
public virtual DbSet<Car> Cars { get; set; }
|
|
public virtual DbSet<Purchase> Purchases { get; set; }
|
|
public virtual DbSet<User> Users{ set; get; }
|
|
public virtual DbSet<Wish> Wishes { get; set; }
|
|
public virtual DbSet<Equipment> Equipments { get; set; }
|
|
}
|
|
}
|