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