Files
mapo-mono/MP.MONO.Data/RoleConfiguration.cs
2022-02-09 18:58:20 +01:00

26 lines
949 B
C#

using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace MP.MONO.Data
{
public class RoleConfiguration : IEntityTypeConfiguration<IdentityRole>
{
#region Public Methods
public void Configure(EntityTypeBuilder<IdentityRole> builder)
{
builder.HasData(
//new IdentityRole { Name = "Undef", NormalizedName = "UNDEF" },
//new IdentityRole { Name = "ExtUser", NormalizedName = "EXTUSER" },
//new IdentityRole { Name = "ExtTransp", NormalizedName = "EXTTRANSP" },
new IdentityRole { Name = "User", NormalizedName = "USER" },
new IdentityRole { Name = "Admin", NormalizedName = "ADMIN" },
new IdentityRole { Name = "SuperAdmin", NormalizedName = "SUPERADMIN" }
);
}
#endregion Public Methods
}
}