33 lines
1005 B
C#
33 lines
1005 B
C#
using PF3.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace PF3;
|
|
|
|
public class PF3DbContext : DbContext
|
|
{
|
|
public DbSet<Show> Shows { get; set; }
|
|
public DbSet<Sound> Sounds { get; set; }
|
|
public DbSet<SoundCategory> SoundsCategorys { get; set; }
|
|
public DbSet<SoundTimecode> SoundsTimecodes { get; set; }
|
|
public DbSet<Staff> Staffs { get; set; }
|
|
public DbSet<Truck> Trucks { get; set; }
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)//Configuration de la connexion à la BDD
|
|
{
|
|
/*
|
|
string connectionString =
|
|
"Server=romaric-thibault.fr;" +
|
|
"Database=timothe_EfCoreLibrary;" +
|
|
"User Id=timothe;" +
|
|
"Password=Onto9-Cage-Afflicted;" +
|
|
"TrustServerCertificate=true;";
|
|
|
|
optionsBuilder.UseSqlServer(connectionString);
|
|
*/
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
//Vide pour le moment
|
|
}
|
|
} |