0

在 asp.net mvc3 和 Code First EF 中创建模型多级菜单的最佳方法是什么?在我的实现中:

public class Menu{
public int id{get;set;}
public string Name{get;set;}
public List<Menu> Menus{get;set;}
}  

但我认为,在递归中,EF 不能绑定这个模型:(

4

1 回答 1

0

This, in principle should work. I think the Entity Framework is messing with the 's' at the end of the "Menus" word. Try this and tell me whether it was successful:

public class Menu{
public int id{get;set;}
public string Name{get;set;}
public List<Menu> SubMenus{get;set;}
}  
于 2012-08-29T21:38:50.450 回答