Separated app into three layers, cleaned up leftovers
This commit is contained in:
23
Birdmap.DAL/Entities/Configurations/UserConfiguration.cs
Normal file
23
Birdmap.DAL/Entities/Configurations/UserConfiguration.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace Birdmap.DAL.Entities.Configurations
|
||||
{
|
||||
public class UserConfiguration : IEntityTypeConfiguration<User>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<User> builder)
|
||||
{
|
||||
builder.Property(u => u.Name)
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(u => u.PasswordHash)
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(u => u.PasswordSalt)
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(u => u.Role)
|
||||
.IsRequired();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user