|
|
|
@ -21,21 +21,20 @@ public class MainDbContext : DbContext |
|
|
|
|
.EnableSensitiveDataLogging(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder) |
|
|
|
|
{ |
|
|
|
|
modelBuilder.Entity<BusinessUnitSqlDto>().Property(p => p.Id).UseMySqlIdentityColumn(); |
|
|
|
|
modelBuilder.Entity<AgenceSqlDto>().Property(p => p.Id).UseMySqlIdentityColumn(); |
|
|
|
|
modelBuilder.Entity<FonctionSqlDto>().Property(p => p.Id).UseMySqlIdentityColumn(); |
|
|
|
|
modelBuilder.Entity<TechnologieSqlDto>().Property(p => p.Id).UseMySqlIdentityColumn(); |
|
|
|
|
modelBuilder.Entity<CollaborateurSqlDto>().Property(p=> p.Id).UseMySqlIdentityColumn(); |
|
|
|
|
modelBuilder |
|
|
|
|
.Entity<CollaborateurSqlDto>() |
|
|
|
|
.Property(e => e.Gender) |
|
|
|
|
.HasConversion<string>(); |
|
|
|
|
modelBuilder |
|
|
|
|
.Entity<CollaborateurSqlDto>() |
|
|
|
|
.Property(e => e.Status) |
|
|
|
|
.HasConversion<string>(); |
|
|
|
|
} |
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder) |
|
|
|
|
{ |
|
|
|
|
modelBuilder.Entity<BusinessUnitSqlDto>().Property(p => p.Id).UseMySqlIdentityColumn(); |
|
|
|
|
modelBuilder.Entity<AgenceSqlDto>().Property(p => p.Id).UseMySqlIdentityColumn(); |
|
|
|
|
modelBuilder.Entity<FonctionSqlDto>().Property(p => p.Id).UseMySqlIdentityColumn(); |
|
|
|
|
modelBuilder.Entity<TechnologieSqlDto>().Property(p => p.Id).UseMySqlIdentityColumn(); |
|
|
|
|
modelBuilder.Entity<CollaborateurSqlDto>().Property(p => p.Id).UseMySqlIdentityColumn(); |
|
|
|
|
modelBuilder |
|
|
|
|
.Entity<CollaborateurSqlDto>() |
|
|
|
|
.Property(e => e.Gender) |
|
|
|
|
.HasConversion<string>(); |
|
|
|
|
modelBuilder |
|
|
|
|
.Entity<CollaborateurSqlDto>() |
|
|
|
|
.Property(e => e.Status) |
|
|
|
|
.HasConversion<string>(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |