MetadataWorkspace.GetItem 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_pubmethodGetItem<T>(String, Boolean, DataSpace)

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

System_CAPS_pubmethodGetItem<T>(String, DataSpace)

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


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

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

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

Parameters

identity
Type: System.String

The identity of the item.

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.

Return Value

Type: T

The item that matches the given identity in the specified data model.

Type Parameters

T

The type returned by the method.

Exception Condition
ArgumentException

Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace


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

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

public virtual T GetItem<T>(
	string identity,
	DataSpace dataSpace
)
where T : GlobalItem

Parameters

identity
Type: System.String

The identity of the item.

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

The conceptual model in which the item is searched.

Return Value

Type: T

The item that matches the given identity in the specified data model.

Type Parameters

T

The type returned by the method.

Exception Condition
ArgumentException

Thrown if the space is not a valid space. Valid space is either C, O, CS or OCSpace