dbcontext et endpoint begin

This commit is contained in:
2025-10-02 17:52:40 +02:00
parent 165addd785
commit 8d0c2aa3f6
15 changed files with 4922 additions and 223 deletions

33
PF3/PF3DbContext.cs Normal file
View File

@@ -0,0 +1,33 @@
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
}
}