最初にEntity Framework 6コードを使用してアプリで使用している次のモデルがあります。
public class Customer
{
public Customer
{
}
public int Id { get; set; }
public string Name { get; set; }
public virtual Address Address { get; set; }
}
public class Address
{
public Address
{
}
public int Id { get; set; }
public string Street { get; set; }
public int Number { get; set; }
public int Country { get; set; }
public virtual Customer Customer { get; set; }
}
それらを保存しようとすると、次のエラーが表示されます。
Unable to determine the principal end of an association between the types Customer and Address