ObjectQuery<T> Constructor

 

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

NameDescription
System_CAPS_pubmethodObjectQuery<T>(String, ObjectContext)

Creates a new ObjectQuery<T> instance using the specified Entity SQL command as the initial query.

System_CAPS_pubmethodObjectQuery<T>(String, ObjectContext, MergeOption)

Creates a new ObjectQuery<T> instance using the specified Entity SQL command as the initial query and the specified merge option.


ObjectQuery<T> Constructor (String, ObjectContext)

Creates a new ObjectQuery<T> instance using the specified Entity SQL command as the initial query.

public ObjectQuery(
	string commandText,
	ObjectContext context
)

Parameters

commandText
Type: System.String

The Entity SQL query.

context
Type: System.Data.Entity.Core.Objects.ObjectContext

The ObjectContext on which to execute the query.


ObjectQuery<T> Constructor (String, ObjectContext, MergeOption)

Creates a new ObjectQuery<T> instance using the specified Entity SQL command as the initial query and the specified merge option.

public ObjectQuery(
	string commandText,
	ObjectContext context,
	MergeOption mergeOption
)

Parameters

commandText
Type: System.String

The Entity SQL query.

context
Type: System.Data.Entity.Core.Objects.ObjectContext

The ObjectContext on which to execute the query.

mergeOption
Type: System.Data.Entity.Core.Objects.MergeOption

Specifies how the entities that are retrieved through this query should be merged with the entities that have been returned from previous queries against the same ObjectContext .