Create models and Clean Arch boilerplate
This commit is contained in:
parent
3926db5446
commit
872dc1e263
21 changed files with 576 additions and 27 deletions
|
@ -0,0 +1,19 @@
|
|||
namespace CSR.Infrastructure.Persistence.Configurations;
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
|
||||
public class RoleConfiguration : IEntityTypeConfiguration<Role>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Role> builder)
|
||||
{
|
||||
builder.Property(u => u.Id)
|
||||
.HasColumnName("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
builder.Property(u => u.Name)
|
||||
.HasColumnName("RoleName")
|
||||
.IsRequired();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue