17 lines
551 B
C#
17 lines
551 B
C#
using Hutopy.Infrastructure.Identity;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace Hutopy.Infrastructure.Data.Configurations;
|
|
|
|
public class ApplicationUserConfiguration : IEntityTypeConfiguration<ApplicationUser>
|
|
{
|
|
public void Configure(EntityTypeBuilder<ApplicationUser> builder)
|
|
{
|
|
// Relationship between ApplicationUser and SocialNetworks
|
|
builder
|
|
.OwnsOne(u => u.SocialNetworks)
|
|
.ToTable($"{nameof(ApplicationUser)}_SocialNetworks");
|
|
}
|
|
}
|