EntityConnection.GetMetadataWorkspace 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
傳回與此 EntityConnection 相關聯的 MetadataWorkspace。
命名空間: System.Data.Entity.Core.EntityClient
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")> _
Public Overridable Function GetMetadataWorkspace As MetadataWorkspace
'用途
Dim instance As EntityConnection
Dim returnValue As MetadataWorkspace
returnValue = instance.GetMetadataWorkspace()
[SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
public virtual MetadataWorkspace GetMetadataWorkspace()
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1024:UsePropertiesWhereAppropriate")]
public:
virtual MetadataWorkspace^ GetMetadataWorkspace()
[<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")>]
abstract GetMetadataWorkspace : unit -> MetadataWorkspace
[<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")>]
override GetMetadataWorkspace : unit -> MetadataWorkspace
public function GetMetadataWorkspace() : MetadataWorkspace
傳回值
類型:System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace
與此 MetadataWorkspace 相關聯的 EntityConnection。
例外狀況
例外狀況 | 條件 |
---|---|
MetadataException | 包含無效 Metadata 關鍵字值的內嵌連接字串。 |