ObjectContext.CreateQuery<T> Method (String, ObjectParameter[])

 

Creates an ObjectQuery<T> in the current object context by using the specified query string.

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

public virtual ObjectQuery<T> CreateQuery<T>(
	string queryString,
	params ObjectParameter[] parameters
)

Parameters

queryString
Type: System.String

The query string to be executed.

parameters
Type: System.Data.Entity.Core.Objects.ObjectParameter[]

Parameters to pass to the query.

Return Value

Type: System.Data.Entity.Core.Objects.ObjectQuery<T>

An ObjectQuery<T> of the specified type.

Type Parameters

T

The entity type of the returned ObjectQuery<T>.

Exception Condition
ArgumentNullException

The queryString or parameters parameter is null.