Created
November 16, 2017 19:44
-
-
Save scottsauber/adacdfd388b019b29eca62ed37c7bce4 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
public class PostConfig : IEntityTypeConfiguration<Post> | |
{ | |
public void Configure(EntityTypeBuilder<Post> builder) | |
{ | |
builder.HasOne(p => p.Blog) | |
.WithOne(b => b.Posts) | |
.HasForeignKey(p => p.BlogId) | |
.HasConstraintName("ForeignKey_Post_Blog"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment