it:ad:code_first:fluentapi:relationships:examples:1-1:home

IT:AD:EF/CodeFirst/FluentAPI/Relationships/Examples/1-1 (One-To-One)

 //1-1:
        modelBuilder.Entity<User>()
            .HasRequired(i => i.BillingAddress)
            .WithMany(); //1-0: as it can be shared with User, don't bind Invoice and Address, so avoid .WithRequired

  • /home/skysigal/public_html/data/pages/it/ad/code_first/fluentapi/relationships/examples/1-1/home.txt
  • Last modified: 2023/11/04 03:02
  • by 127.0.0.1