34 lines
1.0 KiB
C#
Executable File
34 lines
1.0 KiB
C#
Executable File
// using Contracts;
|
|
// using Microsoft.AspNetCore.Identity;
|
|
// using Microsoft.EntityFrameworkCore;
|
|
// using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
// namespace Auth.Domain.Configuration;
|
|
|
|
// public class RoleConfiguration : IEntityTypeConfiguration<IdentityRole>
|
|
// {
|
|
// private List<IdentityRole> CreateRoles()
|
|
// {
|
|
// var roleList = new List<IdentityRole>();
|
|
// // foreach (var role in Enum.GetValues(typeof(AppEnum.Roles)))
|
|
// // {
|
|
// // var newRole = new IdentityRole()
|
|
// // {
|
|
// // Id = Guid.NewGuid().ToString(),
|
|
// // Name = role.ToString(),
|
|
// // NormalizedName = role.ToString().ToUpper(),
|
|
// // ConcurrencyStamp = Guid.NewGuid().ToString()
|
|
// // };
|
|
// // roleList.Add(newRole);
|
|
// // }
|
|
|
|
// return roleList;
|
|
// }
|
|
|
|
|
|
// public void Configure(EntityTypeBuilder<IdentityRole> builder)
|
|
// {
|
|
// builder.HasData(CreateRoles());
|
|
// }
|
|
// }
|