Files
Samuele Locatelli 67fe028cb6 Pulizia conf utenti
2024-02-15 17:40:05 +01: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("samuele.locatelli@egalware.com", "th1sIsTh3R1vrOfThNgt96"),
getNewTestRec("emmanuele.sassi@egalware.com", "th1sIsTh3R1vrOfThNgt98!"),
// Admin
getNewTestRec("marco.locatelli@egalware.com", "th1sIsTh3R1vrOfThNgt94"),
getNewTestRec("samuele@steamware.net", "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
}
}