MetadataWorkspace.CreateQueryCommandTree Method (DbExpression)

 

Creates a new DbQueryCommandTree bound to this metadata workspace based on the specified query expression.

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

public virtual DbQueryCommandTree CreateQueryCommandTree(
	DbExpression query
)

Parameters

query
Type: System.Data.Entity.Core.Common.CommandTrees.DbExpression

A DbExpression that defines the query.

Return Value

Type: System.Data.Entity.Core.Common.CommandTrees.DbQueryCommandTree

A new DbQueryCommandTree with the specified expression as it's Query property.

Exception Condition
ArgumentNullException

If query is null

ArgumentException

If query contains metadata that cannot be resolved in this metadata workspace

ArgumentException

If query is not structurally valid because it contains unresolvable variable references