DbModelExtensions.GetStoreModel 方法

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 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-cn/library/bb384936(v=vs.113)https://msdn.microsoft.com/zh-cn/library/bb383977(v=vs.113)

请参阅

参考

DbModelExtensions 类

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