小编use*_*479的帖子

无法使用集合初始值设定项初始化类型,因为它没有实现“System.Collections.IEnumerable”

我有 3 个主菜单实体。和子菜单。我创建了菜单视图模型。

我的实体:

主菜单.cs:

public UstMenuler()
{
    AltMenuler = new HashSet<AltMenuler>();
}

public int ID { get; set; }
public string Name { get; set; }
public bool AktifMi { get; set; }
public int YetkiID { get; set; }
public string ControllerName { get; set; }
public string ActionName { get; set; }
public virtual Yetkilendirme Yetkilendirme { get; set; }
public virtual ICollection<AltMenuler> AltMenuler { get; set; }
Run Code Online (Sandbox Code Playgroud)

子菜单.cs:

public partial class AltMenuler
{      
    public AltMenuler()
    { …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-mvc controller view viewmodel

1
推荐指数
1
解决办法
5457
查看次数

标签 统计

asp.net-mvc ×1

c# ×1

controller ×1

view ×1

viewmodel ×1