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
提前谢谢