エンティティ Foo があり、別のエンティティ Bar のリストが含まれているとします。Bar は Foo を直接参照する必要がありますか? つまり..
public class Foo
{
public int Id {get; set;}
public IList<Bar> Bars {get; set;}
}
public class Bar
{
public int Id {get; set;}
public Foo parentFoo {get; set; //this will be set to an the Foo entity on creation
}
または、Bar クラスで Foo への参照を省略しますか?
私はその参照を除外することに傾いていますが、ここで正しいアプローチは何だろうと思っていましたか?