共用方式為


DbModelExtensions.GetStoreModel 方法

[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]

注意:這個 API 現在已經過時。

從指定的 DbModel 取得存放區模型。

命名空間:  System.Data.Entity.Core.Metadata.Edm
組件:  EntityFramework (在 EntityFramework.dll 中)

語法

'宣告
<ExtensionAttribute> _
<ObsoleteAttribute("StoreModel is now available as a property directly on DbModel.")> _
Public Shared Function GetStoreModel ( _
    model As IEdmModelAdapter _
) As EdmModel
'用途
Dim model As IEdmModelAdapter 
Dim returnValue As EdmModel 

returnValue = model.GetStoreModel()
[ObsoleteAttribute("StoreModel is now available as a property directly on DbModel.")]
public static EdmModel GetStoreModel(
    this IEdmModelAdapter model
)
[ExtensionAttribute]
[ObsoleteAttribute(L"StoreModel is now available as a property directly on DbModel.")]
public:
static EdmModel^ GetStoreModel(
    IEdmModelAdapter^ model
)
[<ObsoleteAttribute("StoreModel is now available as a property directly on DbModel.")>]
static member GetStoreModel : 
        model:IEdmModelAdapter -> EdmModel
public static function GetStoreModel(
    model : IEdmModelAdapter
) : EdmModel

參數

傳回值

類型:System.Data.Entity.Core.Metadata.Edm.EdmModel
表示存放區模型之 EdmModel 的執行個體。

使用注意事項

在 Visual Basic 和 C# 中,您可以在任何 IEdmModelAdapter 類型物件中呼叫這個方法以做為執行個體。使用執行個體方法語法呼叫這個方法時,請省略第一個參數。如需詳細資訊,請參閱 https://msdn.microsoft.com/zh-tw/library/bb384936(v=vs.113)https://msdn.microsoft.com/zh-tw/library/bb383977(v=vs.113)

請參閱

參考

DbModelExtensions 類別

System.Data.Entity.Core.Metadata.Edm 命名空間