I\'m stuck at trying to write the Entity Framework 4.1 code first model for the following DB relationship.
Here is a visual of the relationship.
This blog has the example using Fluent API configurations.
Multiple foreign keys within same table using CodeFirst Entity Framework and Fluent API
modelBuilder.Entity().HasOptional(b => b.PrimaryContact) .WithMany(a => a.PrimaryContactFor).HasForeignKey(b=>b.PrimaryContactID);