2010-05-10 114 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

爲您的實體,既暴露了未映射屬性和映射屬性您可以在視圖所需要的屬性的包裝類。