Guest User

Untitled

a guest
Nov 18th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. public class PostConfig : IEntityTypeConfiguration<Post>
  2. {
  3. public void Configure(EntityTypeBuilder<Post> builder)
  4. {
  5. builder.HasOne(p => p.Blog)
  6. .WithOne(b => b.Posts)
  7. .HasForeignKey(p => p.BlogId)
  8. .HasConstraintName("ForeignKey_Post_Blog");
  9. }
  10. }
Add Comment
Please, Sign In to add comment