UserRoleConfiguration.cs 875 B

1234567891011121314151617181920212223242526272829
  1. using Microsoft.AspNetCore.Identity;
  2. using Microsoft.EntityFrameworkCore;
  3. using Microsoft.EntityFrameworkCore.Metadata.Builders;
  4. namespace MTWorkHR.Identity.Configurations
  5. {
  6. public class UserRoleConfiguration : IEntityTypeConfiguration<IdentityUserRole<string>>
  7. {
  8. public void Configure(EntityTypeBuilder<IdentityUserRole<string>> builder)
  9. {
  10. builder.HasData(
  11. new IdentityUserRole<string>
  12. {
  13. RoleId = "AD5B3B92-2311-48F8-9DEC-F9FAEF1F211A",
  14. UserId = "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA"
  15. },
  16. new IdentityUserRole<string>
  17. {
  18. RoleId = "EM5B3B92-2311-48F8-9DEC-F9FAEF1F211E",
  19. UserId = "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB"
  20. }
  21. );
  22. }
  23. }
  24. }