私は現在クラスを持っています:
[Table("TitleCategoryMovie", Schema = "dbo")]
public class TitleCategoryMovie
{
[Key]
public int Id { get; set; }
public string CreatedBy { get; set; }
public DateTime CreateDatetime { get; set; }
public string UpdatedBy { get; set; }
public DateTime UpdateDatetime { get; set; }
[ForeignKey("Id")]
public virtual Title Title { get; set; }
}
と呼ばれるテーブルがありますTitle。そして、すべてTitleCategoryMovieに対応するがありますが、すべてにに対応するわけTitleではありません。Titleの列は、TitleCategoryMovieでも同じです。しかし、両方のエンティティクラスをDbContextに追加すると、エラーが発生します。TitleTitleCategoryMovieId
Multiplicity is not valid in Role 'TitleCategoryMovieStandalone_Title_Source' in relationship 'TitleCategoryMovieStandalone_Title'. Because the Dependent Role refers to the key properties, the upper bound of the multiplicity of the Dependent Role must be �1�.
Idの列をTitleCategoryMovie主キーと外部キーとしてすでに定義してTitleいるので、なぜこのエラーが発生するのかわかりません。どうしたの?