dbcontext et endpoint begin
This commit is contained in:
33
PF3/PF3DbContext.cs
Normal file
33
PF3/PF3DbContext.cs
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user