Share via


MetadataWorkspace.GetItem Method

Definition

Overloads

GetItem<T>(String, DataSpace)

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

GetItem<T>(String, Boolean, DataSpace)

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

GetItem<T>(String, DataSpace)

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

public virtual T GetItem<T> (string identity, System.Data.Entity.Core.Metadata.Edm.DataSpace dataSpace) where T : System.Data.Entity.Core.Metadata.Edm.GlobalItem;
abstract member GetItem : string * System.Data.Entity.Core.Metadata.Edm.DataSpace -> 'T (requires 'T :> System.Data.Entity.Core.Metadata.Edm.GlobalItem)
override this.GetItem : string * System.Data.Entity.Core.Metadata.Edm.DataSpace -> 'T (requires 'T :> System.Data.Entity.Core.Metadata.Edm.GlobalItem)

Type Parameters

T

The type returned by the method.

Parameters

identity
String

The identity of the item.

dataSpace
DataSpace

The conceptual model in which the item is searched.

Returns

T

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

Exceptions

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

Applies to

GetItem<T>(String, Boolean, DataSpace)

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

public virtual T GetItem<T> (string identity, bool ignoreCase, System.Data.Entity.Core.Metadata.Edm.DataSpace dataSpace) where T : System.Data.Entity.Core.Metadata.Edm.GlobalItem;
abstract member GetItem : string * bool * System.Data.Entity.Core.Metadata.Edm.DataSpace -> 'T (requires 'T :> System.Data.Entity.Core.Metadata.Edm.GlobalItem)
override this.GetItem : string * bool * System.Data.Entity.Core.Metadata.Edm.DataSpace -> 'T (requires 'T :> System.Data.Entity.Core.Metadata.Edm.GlobalItem)

Type Parameters

T

The type returned by the method.

Parameters

identity
String

The identity of the item.

ignoreCase
Boolean

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

dataSpace
DataSpace

The conceptual model on which the item is searched.

Returns

T

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

Exceptions

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

Applies to