There are a few questions out there but none of them have been much help to me so I decided to ask my own.
I want to use Entity Framework code first to create a st
In your mappings you set Document
as principal, but in reality it is the dependent. So you should change your mappings to:
modelBuilder.Entity<Document>()
.HasRequired(d => d.Qualification)
.WithOptionalDependent(q => q.Document);
modelBuilder.Entity<Document>()
.HasRequired(d => d.Asssessment)
.WithOptionalDependent(q => q.Document);