Foreign Key Association is where you have a foreign key property in your model in addition to the corresponding Navigation Property. Independent Association is when you have a foreign key column in your database but the foreign key property corresponding to this column is not in your model - i.e. you have a NavigationProperty but there is no foreign key property that would tell you what the ID value of the related property is without actually going to the related property.
Here is an example of a model with an Independent Association (notice that the Dependent does not have a foreign key - just navigation property):
public class Dependent
{
public int Id { get; set; }
[Required]
public Principal PrincipalEntity { get; set; }
}
public class Principal
{
public int Id { get; set; }
public ICollection<Dependent> DependentEntities { get; set; }
}
public class MyContext : DbContext
{
public DbSet<Dependent> Dependents { get; set; }
public DbSet<Principal> Principals { get; set; }
}
And here is an example of the same model but with the ForeignKey Association (notice the PrincipalEntity_Id property and the [ForeignKey()] attribute):
public class Dependent
{
public int Id { get; set; }
public int PrincipalEntity_Id { get; set; }
[Required]
[ForeignKey("PrincipalEntity_Id")]
public Principal PrincipalEntity { get; set; }
}
public class Principal
{
public int Id { get; set; }
public ICollection<Dependent> DependentEntities { get; set; }
}
public class MyContext : DbContext
{
public DbSet<Dependent> Dependents { get; set; }
public DbSet<Principal> Principals { get; set; }
}
Note that your database won't change - the underlying database always had the column for the foreign key but with the independent association it was not exposed.
With foreign key associations you can update the relationship just by changing the value of the foreign key. This is handy if you know the value because you don't need to load the entity you want to update the navigation property to.