Entity Framework 4.1 Retrieving self referencing data
问题 I am using Entity Framework 4.1 code first and ASP.NET MVC 3 and I am struggling to get my self referencing setup properly. I have a Category class. It must be self referencing to itself. A category can be a parent category when the ParentCategoryId in the table is null. If a category has a ParentCategoryId with a value then it means that it belongs to a parent category. I followed this article on Code Project. Here is my Category class: public class Category { public int Id { get; set; }