Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
LinqToEntity を使用して、ParenCategoryId という自己参照を持つ主キーとして Id を持つカテゴリというテーブルをどのようにマップしますか?
ID から ParentCategoryID を指す FK を作成します。EF はそこからナビゲーション プロパティを取得する必要があります。ただし、この名前は役に立たないため、「ParentCategory」などのより適切な名前に変更するには、(コード ジェネレーターまたは T4 テンプレートを使用して) 追加の作業を行う必要があります。