This can happen if your configuration and your model do not match.
Let’s say in your db configuration you have a rule like this:
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Entity<Agent>().HasRequired(x=>x.MailingAddress);
//..
But in your model you say that MailingAddress is optional:
public int? MailingAddressId { get; set; }
I believe the issue has something to do with the fact that Agent has
more than one property of type Address and possibly also because one
of them is nullable
It’s not the case.