MetadataWorkspace.TryGetItem Method

 

Searches for an item with the given identity in the given space.

Namespace:   System.Data.Entity.Core.Metadata.Edm
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodTryGetItem<T>(String, Boolean, DataSpace, T)

Returns an item by using the specified identity and the data model.

System_CAPS_pubmethodTryGetItem<T>(String, DataSpace, T)

Returns an item by using the specified identity and the data model.


MetadataWorkspace.TryGetItem<T> Method (String, Boolean, DataSpace, T)

Returns an item by using the specified identity and the data model.

public virtual bool TryGetItem<T>(
	string identity,
	bool ignoreCase,
	DataSpace dataSpace,
	out T item
)
where T : GlobalItem

Parameters

identity
Type: System.String

The conceptual model on which the item is searched.

ignoreCase
Type: System.Boolean

true to perform the case-insensitive search; otherwise, false.

dataSpace
Type: System.Data.Entity.Core.Metadata.Edm.DataSpace

The conceptual model on which the item is searched.

item
Type: T

When this method returns, contains a T:System.Data.Metadata.Edm.GlobalIem object. This parameter is passed uninitialized.

Return Value

Type: System.Boolean

true if there is an item that matches the search criteria; otherwise, false.

Type Parameters

T

The type returned by the method.


MetadataWorkspace.TryGetItem<T> Method (String, DataSpace, T)

Returns an item by using the specified identity and the data model.

public virtual bool TryGetItem<T>(
	string identity,
	DataSpace space,
	out T item
)
where T : GlobalItem

Parameters

identity
Type: System.String

The conceptual model on which the item is searched.

space
Type: System.Data.Entity.Core.Metadata.Edm.DataSpace

The conceptual model on which the item is searched.

item
Type: T

When this method returns, contains a T:System.Data.Metadata.Edm.GlobalIem object. This parameter is passed uninitialized.

Return Value

Type: System.Boolean

true if there is an item that matches the search criteria; otherwise, false.

Type Parameters

T

The type returned by the method.