MetadataWorkspace.TryGetObjectSpaceType 方法 (StructuralType, StructuralType%)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
透過 out 參數 objectSpaceType 傳回 StructuralType 物件,此物件表示符合參數 edmSpaceType 所提供 EdmType 的類型。
命名空間: System.Data.Entity.Core.Metadata.Edm
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")> _
Public Overridable Function TryGetObjectSpaceType ( _
edmSpaceType As StructuralType, _
<OutAttribute> ByRef objectSpaceType As StructuralType _
) As Boolean
'用途
Dim instance As MetadataWorkspace
Dim edmSpaceType As StructuralType
Dim objectSpaceType As StructuralType
Dim returnValue As Boolean
returnValue = instance.TryGetObjectSpaceType(edmSpaceType, _
objectSpaceType)
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
public virtual bool TryGetObjectSpaceType(
StructuralType edmSpaceType,
out StructuralType objectSpaceType
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1011:ConsiderPassingBaseTypesAsParameters")]
public:
virtual bool TryGetObjectSpaceType(
StructuralType^ edmSpaceType,
[OutAttribute] StructuralType^% objectSpaceType
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")>]
abstract TryGetObjectSpaceType :
edmSpaceType:StructuralType *
objectSpaceType:StructuralType byref -> bool
[<SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")>]
override TryGetObjectSpaceType :
edmSpaceType:StructuralType *
objectSpaceType:StructuralType byref -> bool
public function TryGetObjectSpaceType(
edmSpaceType : StructuralType,
objectSpaceType : StructuralType
) : boolean
參數
- edmSpaceType
類型:System.Data.Entity.Core.Metadata.Edm.StructuralType
表示 EdmType 的 StructuralType 物件。
- objectSpaceType
類型:System.Data.Entity.Core.Metadata.Edm.StructuralType%
當此方法傳回時,會包含 StructuralType 物件,此物件代表物件空間類型。 此參數會以未初始化的狀態傳遞。
傳回值
類型:System.Boolean
如果有符合搜尋準則的類型,則為 true,否則為 false。