Ajout d'un context pour les agences

pull/6/head
Clement FERRERE 3 years ago
parent 43f790493d
commit 14ffece7b1
  1. 3
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/MainDbContext.cs

@ -9,6 +9,8 @@ namespace espacecollab.backend.infrastructure.sql
private IOptions<SqlOption> SqlSettings { get; }
private DbSet<CollaborateurSqlDto>? Collaborateur { get; set; }
private DbSet<AgenceSqlDto>? Agence { get; set; }
public MainDbContext(IOptions<SqlOption> sqlSettings)
{
SqlSettings = sqlSettings;
@ -23,6 +25,7 @@ namespace espacecollab.backend.infrastructure.sql
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<AgenceSqlDto>().Property(p => p.Id).UseMySqlIdentityColumn();
modelBuilder.Entity<CollaborateurSqlDto>().Property(p=> p.Id).UseMySqlIdentityColumn();
modelBuilder
.Entity<CollaborateurSqlDto>()

Loading…
Cancel
Save