ObjectQuery.Execute(MergeOption) 方法

定义

使用指定合并选项执行非类型化对象查询。Executes the untyped object query with the specified merge option.

public:
 System::Data::Objects::ObjectResult ^ Execute(System::Data::Objects::MergeOption mergeOption);
public System.Data.Objects.ObjectResult Execute (System.Data.Objects.MergeOption mergeOption);
member this.Execute : System.Data.Objects.MergeOption -> System.Data.Objects.ObjectResult

参数

mergeOption
MergeOption

要在执行查询时使用的 MergeOptionThe MergeOption to use when executing the query. 默认值为 AppendOnlyThe default is AppendOnly.

返回

一个 ObjectResult<T>,它包含查询返回的实体对象的集合。An ObjectResult<T> that contains a collection of entity objects returned by the query.

注解

对象查询的默认合并选项为 AppendOnlyThe default merge option for object queries is AppendOnly. 有关详细信息, 请参阅标识解析、状态管理和更改跟踪For more information, see Identity Resolution, State Management, and Change Tracking.

为类型化对象查询调用针对 ExecuteObjectQuery<T>的 方法。Call the Execute method on ObjectQuery<T> for typed object queries.

适用于

另请参阅