autobus-api_old/AutobusApi.Infrastructure/Identity/Configurations/IdentityUserRoleConfiguration.cs
2023-11-15 19:00:34 +02:00

23 lines
628 B
C#

using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace AutobusApi.Infrastructure.Identity.Configurations;
public class IdentityUserRoleConfiguration : IEntityTypeConfiguration<IdentityUserRole<int>>
{
public void Configure(EntityTypeBuilder<IdentityUserRole<int>> builder)
{
builder
.ToTable("identity_user_roles");
builder
.Property(ur => ur.UserId)
.HasColumnName("user_id");
builder
.Property(ur => ur.RoleId)
.HasColumnName("role_id");
}
}