2010-05-10 133 views

回答

5

为要扩展的实体创建部分类

例如,

//must be in the same namespace as the Customer entity in the model 
public partial class Customer 
{ 
    public string MyProperty{get;set;} 
} 

此属性将被取消映射,并在运行查询或物化后,你可以用数据填充它。

OR

为您的实体,既暴露了未映射属性和映射属性您可以在视图所需要的属性的包装类。