From cd0e4e6431d067aa22c93c4fab4481a7392d764c Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Fri, 26 Sep 2025 11:09:00 +0200 Subject: [PATCH] Creating DbContext and Models repository --- PyroFetes/PyroFetes.csproj | 10 ++++++++++ PyroFetes/PyroFetesDbContext.cs | 27 +++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 PyroFetes/PyroFetesDbContext.cs diff --git a/PyroFetes/PyroFetes.csproj b/PyroFetes/PyroFetes.csproj index ba1446f..f2a584c 100644 --- a/PyroFetes/PyroFetes.csproj +++ b/PyroFetes/PyroFetes.csproj @@ -8,7 +8,17 @@ + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + diff --git a/PyroFetes/PyroFetesDbContext.cs b/PyroFetes/PyroFetesDbContext.cs new file mode 100644 index 0000000..b5ab500 --- /dev/null +++ b/PyroFetes/PyroFetesDbContext.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore; + +namespace PyroFetes; + +public class PyroFetesDbContext : DbContext +{ + // Entities + + + // Database configuration + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + string connectionString = + "Server=romaric-thibault.fr;" + + "Database=PyroFetes;" + + "User Id=pyrofetes;" + + "Password=Onto9-Cage-Afflicted;" + + "TrustServerCertificate=true;"; + + optionsBuilder.UseSqlServer(connectionString); + } + + // Models customization + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + } +} \ No newline at end of file