|
|
@ -32,37 +32,6 @@ namespace DbContextLib
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
modelBuilder.Entity<UserEntity>().ToTable("user");
|
|
|
|
modelBuilder.Entity<UserEntity>().ToTable("user");
|
|
|
|
modelBuilder.Entity<UserEntity>().HasData(
|
|
|
|
|
|
|
|
new UserEntity(1, "johnny", Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
|
|
|
password: "motdepasse",
|
|
|
|
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
|
|
|
|
iterationCount: 100000,
|
|
|
|
|
|
|
|
numBytesRequested: 256 / 8)), "Johnny.RATTON@etu.uca.fr", true),
|
|
|
|
|
|
|
|
new UserEntity(2, "maxime", Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
|
|
|
password: "motdepasse",
|
|
|
|
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
|
|
|
|
iterationCount: 100000,
|
|
|
|
|
|
|
|
numBytesRequested: 256 / 8)), "Maxime.SAPOUNTZIS@etu.uca.fr", true),
|
|
|
|
|
|
|
|
new UserEntity(3, "clement", Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
|
|
|
password: "motdepasse",
|
|
|
|
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
|
|
|
|
iterationCount: 100000,
|
|
|
|
|
|
|
|
numBytesRequested: 256 / 8)), "Clement.CHIEU@etu.uca.fr", true),
|
|
|
|
|
|
|
|
new UserEntity(4, "erwan", Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
|
|
|
password: "motdepasse",
|
|
|
|
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
|
|
|
|
iterationCount: 100000,
|
|
|
|
|
|
|
|
numBytesRequested: 256 / 8)), "Erwan.MENAGER@etu.uca.fr", true),
|
|
|
|
|
|
|
|
new UserEntity(5, "victor", Convert.ToBase64String(KeyDerivation.Pbkdf2(
|
|
|
|
|
|
|
|
password: "motdepasse",
|
|
|
|
|
|
|
|
salt: RandomNumberGenerator.GetBytes(128 / 8),
|
|
|
|
|
|
|
|
prf: KeyDerivationPrf.HMACSHA256,
|
|
|
|
|
|
|
|
iterationCount: 100000,
|
|
|
|
|
|
|
|
numBytesRequested: 256 / 8)), "Victor.GABORIT@etu.uca.fr", true));
|
|
|
|
|
|
|
|
modelBuilder.Entity<ContentLessonEntity>().HasKey(c => c.LessonId);
|
|
|
|
modelBuilder.Entity<ContentLessonEntity>().HasKey(c => c.LessonId);
|
|
|
|
modelBuilder.Entity<ContentLessonEntity>().HasKey(c => c.LessonPartId);
|
|
|
|
modelBuilder.Entity<ContentLessonEntity>().HasKey(c => c.LessonPartId);
|
|
|
|
modelBuilder.Entity<SuccessEntity>().HasKey(s => s.UserId);
|
|
|
|
modelBuilder.Entity<SuccessEntity>().HasKey(s => s.UserId);
|
|
|
|