If you were to define your classes like this
public class EntityA
{
public int EntityAId { get; set; }
public virtual EntityB EntityB1 { get; set; }
public virtual EntityB EntityB2 { get; set; }
public virtual EntityB EntityB3 { get; set; }
}
public class EntityB
{
public int EntityBId { get; set; }
public string Name { get; set; }
}
EF Code First would create two tables (EntityAs, EntityBs). By convection the EntityAs table would have a primary key of EntityAId and three foreign keys linking to EntityB called (EntityB1_EntityBId, EntityB2_EntityBId, EntityB3_EntityBId).
You can however override this convection by adding properties for the foreign keys and adding RelatedTo tags on the navigation properties.
For example:
public class EntityA
{
public int EntityAId { get; set; }
public int MySpecialFkName { get; set; }
[RelatedTo(ForeignKey = "MySpecialFkName")]
public EntityB EntityB1 { get; set; }
}
If you didn't want the RelatedTo meta data in your POCO class, you could instead define the relationship in the OnModelCreating method.
modelBuilder.Entity<EntityA>().HasRequired(p => p.EntityB1)
.HasConstraint((fk, pk) => fk.MySpecialFkName == pk.EntityBId);