Oliver Booth
e8bc50bbdf
I'd ideally like to keep the blog. subdomain the same, and while there are a few ways to achieve this it is much simpler to just dedicate a separate application for the subdomain. This change also adjusts the webhost builder extensions to default to ports 443/80, and each app now explicitly sets the port it needs.
22 lines
845 B
C#
22 lines
845 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace OliverBooth.Blog.Data.Configuration;
|
|
|
|
internal sealed class UserConfiguration : IEntityTypeConfiguration<User>
|
|
{
|
|
/// <inheritdoc />
|
|
public void Configure(EntityTypeBuilder<User> builder)
|
|
{
|
|
RelationalEntityTypeBuilderExtensions.ToTable((EntityTypeBuilder)builder, "User");
|
|
builder.HasKey(e => e.Id);
|
|
|
|
builder.Property(e => e.Id).IsRequired();
|
|
builder.Property(e => e.DisplayName).HasMaxLength(50).IsRequired();
|
|
builder.Property(e => e.EmailAddress).HasMaxLength(255).IsRequired();
|
|
builder.Property(e => e.Password).HasMaxLength(255).IsRequired();
|
|
builder.Property(e => e.Salt).HasMaxLength(255).IsRequired();
|
|
builder.Property(e => e.Registered).IsRequired();
|
|
}
|
|
}
|