How to define nested Identifying Relationships Entity Framework code first
I'm using EF5 code first in a simple test application at the moment to test various functions. I have defined an 'identifying relationship' between two entities which represent a one-to-many link. Here I define a PhotoCollection that has many child Photo entities; public class PhotoCollection { public int Id { get; set; } public virtual ISet<Photo> Photos { get; private set; } public PhotoCollection() { Photos = new HashSet<Photo>(); } } public class Photo { [Key, ForeignKey("Parent"), Column(Order = 1)] public int PhotoCollectionId { get; set; } [Key, Column(Order = 2)] public int PhotoId {