ObjectQuery<T>.ExecuteAsync 方法 (MergeOption)

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

使用指定的合并选项异步执行对象查询。

命名空间:  System.Data.Entity.Core.Objects
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")> _
Public Function ExecuteAsync ( _
    mergeOption As MergeOption _
) As Task(Of ObjectResult(Of T))
用法
Dim instance As ObjectQuery 
Dim mergeOption As MergeOption 
Dim returnValue As Task(Of ObjectResult(Of T))

returnValue = instance.ExecuteAsync(mergeOption)
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public Task<ObjectResult<T>> ExecuteAsync(
    MergeOption mergeOption
)
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1006:DoNotNestGenericTypesInMemberSignatures")]
public:
Task<ObjectResult<T>^>^ ExecuteAsync(
    MergeOption mergeOption
)
[<SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")>]
member ExecuteAsync : 
        mergeOption:MergeOption -> Task<ObjectResult<'T>> 
public function ExecuteAsync(
    mergeOption : MergeOption
) : Task<ObjectResult<T>>

参数

返回值

类型:System.Threading.Tasks.Task<ObjectResult<T>>
表示异步操作的任务。任务结果包含一个 ObjectResult<T>,其中包含查询返回的实体对象集合。

备注

不支持对同一上下文实例执行多个活动操作。 使用“await”以确保在对此上下文调用另一个方法前完成了所有异步操作。

请参阅

参考

ObjectQuery<T> 类

ExecuteAsync 重载

System.Data.Entity.Core.Objects 命名空间