Created
July 10, 2019 07:03
-
-
Save ducmeit1/e089ad7e28fc5bb2ba5c935e7c510599 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.EntityFrameworkCore.Metadata.Builders; | |
namespace Demo.Configurations { | |
public sealed class UserConfiguration : IEntityTypeConfiguration<User> | |
{ | |
public void Configure(EntityTypeBuilder<User> builder) { | |
builder.ToTable("UsersTbl"); | |
builder.HasKey(u => u.Id); | |
builder.Property(u => u.FirstName).IsRequired(); | |
builder.Property(u => u.LastName).IsRequired(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment