Files
2023-07-21 16:46:03 +02:00

47 lines
1.4 KiB
C#

using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using WebDoorCreator.Data.DbModels;
namespace WebDoorCreator.Data
{
public class TestConfiguration : IEntityTypeConfiguration<IdentityTableSeedTest>
{
#region Public Methods
public void Configure(EntityTypeBuilder<IdentityTableSeedTest> builder)
{
// Default seeded users
builder.HasData(
// SuperAdmins
getNewTestRec("zaccaria.majid@egalware.com", "th1sIsTh3R1vrOfThNgt98"),
getNewTestRec("samuele.locatelli@egalware.com", "th1sIsTh3R1vrOfThNgt96"),
// Admin
getNewTestRec("zaccaria.majid01@egalware.com", "th1sIsTh3R1vrOfThNgt94"),
getNewTestRec("zaccaria.majid02@egalware.com", "th1sIsTh3R1vrOfThNgt92")
);
}
#endregion Public Methods
#region Protected Fields
#endregion Protected Fields
#region Protected Methods
protected IdentityTableSeedTest getNewTestRec(string campo1, string campo2)
{
var newRec = new IdentityTableSeedTest
{
Campo1 = campo1,
Campo2 = campo2.ToUpper()
};
return newRec;
}
#endregion Protected Methods
}
}