1
我在VS使用MVC脚手架+ EF6在Web applicatioon项目2013年脚手架未检测Complext类型属性的实体
域类(entites的)和上下文(DbContext
)是通过引用两个独立的项目Web项目。
我有一个Patient类,它具有如下的复杂属性。
public class Patient
{
public int PatientId { get; set; }
// Some properties
// Complex property
public MyComplexType Complex { get; set; }
}
public class MyComplexType
{
public SomeType Property1 { get; set; }
public SomeOtherType Property2 { get; set; }
}
问题:
MVC脚手架引擎没有检测到复杂的财产Patient
类和生成的视图不包含字段,以显示或编辑属性。我尝试装饰MyComplexType
类与ComplexType
属性,但它没有奏效。
可以做些什么?