Files
CleanArchitecture/CleanArchitecture/CleanArchitecture.Identity/Configurations/RoleConfiguration.cs
2024-02-18 22:14:34 +01:00

34 lines
1.0 KiB
C#

using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace CleanArchitecture.Identity.Configurations
{
public class RoleConfiguration : IEntityTypeConfiguration<IdentityRole>
{
public void Configure(EntityTypeBuilder<IdentityRole> builder)
{
builder.HasData(
new IdentityRole
{
Id = "26f31fc8-f911-4761-956f-e72c0041c9c9",
Name = "Administrator",
NormalizedName = "ADMINISTRATOR"
},
new IdentityRole
{
Id = "580b6053-a9a1-4373-8081-b1ae5db82406",
Name = "Operator",
NormalizedName = "OPERATOR"
}
);
}
}
}