From 14ffece7b1ed40ae36fc6423d7f9426a10b51a58 Mon Sep 17 00:00:00 2001 From: Clement FERRERE Date: Fri, 18 Feb 2022 11:14:52 +0100 Subject: [PATCH] Ajout d'un context pour les agences --- .../espacecollab.backend.infrastructure.sql/MainDbContext.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/MainDbContext.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/MainDbContext.cs index 247426c..332d107 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/MainDbContext.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/MainDbContext.cs @@ -9,6 +9,8 @@ namespace espacecollab.backend.infrastructure.sql private IOptions SqlSettings { get; } private DbSet? Collaborateur { get; set; } + private DbSet? Agence { get; set; } + public MainDbContext(IOptions sqlSettings) { SqlSettings = sqlSettings; @@ -23,6 +25,7 @@ namespace espacecollab.backend.infrastructure.sql protected override void OnModelCreating(ModelBuilder modelBuilder) { + modelBuilder.Entity().Property(p => p.Id).UseMySqlIdentityColumn(); modelBuilder.Entity().Property(p=> p.Id).UseMySqlIdentityColumn(); modelBuilder .Entity()