Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 用于创建ICollection的EditorTemplate_C#_Asp.net_Asp.net Mvc 4 - Fatal编程技术网

C# 用于创建ICollection的EditorTemplate

C# 用于创建ICollection的EditorTemplate,c#,asp.net,asp.net-mvc-4,C#,Asp.net,Asp.net Mvc 4,使用建议的方法,我成功地为大多数类型创建了一个视图。然而,有两个集合我有问题 public class BuildingPermit { public int ApplicationID { get; set; } public virtual Person Applicant { get; set; } public virtual Area ApplicantArea { get; set; } public virtual ICollection<Ow

使用建议的方法,我成功地为大多数类型创建了一个视图。然而,有两个集合我有问题

public class BuildingPermit
{
    public int ApplicationID { get; set; }
    public virtual Person Applicant { get; set; }
    public virtual Area ApplicantArea { get; set; }
    public virtual ICollection<Owner> Owners { get; set; }
    /...
}
公共类建筑许可证
{
public int ApplicationID{get;set;}
公共虚拟人申请人{get;set;}
公共虚拟区域应用程序区域{get;set;}
公共虚拟ICollection所有者{get;set;}
/...
}
正如我在链接问题中提到的,我使用scaffolding为我的自定义类型创建了控制器和所有视图,我希望在同一页面(视图)中注册所有详细信息,这意味着在
BuildingPermit
的创建视图中,使用类型
ICollection
所有者创建详细信息。其他类型的行为与它们应该的一样,但不是
ICollection
类型

我想让用户能够以某种方式在
BuildingPermit
的create视图中注册一些
Owner
s。如果不可能,至少创建1、2或3

提前谢谢