ObjectResult 类
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
此类实现 IEnumerable 和 IDisposable。 从 ObjectQuery.Execute 方法返回此类的实例。
继承层次结构
System.Object
System.Data.Entity.Core.Objects.ObjectResult
System.Data.Entity.Core.Objects.ObjectResult<T>
命名空间: System.Data.Entity.Core.Objects
程序集: EntityFramework(在 EntityFramework.dll 中)
语法
声明
<SuppressMessageAttribute("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")> _
<SuppressMessageAttribute("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")> _
Public MustInherit Class ObjectResult _
Implements IEnumerable, IDisposable, IListSource, IDbAsyncEnumerable
用法
Dim instance As ObjectResult
[SuppressMessageAttribute("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")]
[SuppressMessageAttribute("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
public abstract class ObjectResult : IEnumerable,
IDisposable, IListSource, IDbAsyncEnumerable
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1010:CollectionsShouldImplementGenericInterface")]
[SuppressMessageAttribute(L"Microsoft.Naming", L"CA1710:IdentifiersShouldHaveCorrectSuffix")]
public ref class ObjectResult abstract : IEnumerable,
IDisposable, IListSource, IDbAsyncEnumerable
[<AbstractClassAttribute>]
[<SuppressMessageAttribute("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")>]
[<SuppressMessageAttribute("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")>]
type ObjectResult =
class
interface IEnumerable
interface IDisposable
interface IListSource
interface IDbAsyncEnumerable
end
public abstract class ObjectResult implements IEnumerable, IDisposable, IListSource, IDbAsyncEnumerable
ObjectResult 类型公开以下成员。
构造函数
名称 | 描述 | |
---|---|---|
ObjectResult | 仅当创建将重写具有模拟或伪造行为的成员的测试替身时,才使用此构造函数。将此构造函数用于其他目的可能导致意外的行为,包括但不限于引发 NullReferenceException。 |
顶部
属性
名称 | 描述 | |
---|---|---|
ElementType | 在派生类中重写时,获取泛型 ObjectResult<T> 的类型。 |
顶部
方法
名称 | 描述 | |
---|---|---|
Dispose() | 执行与释放 (free)、释放 (release) 或重置资源关联的任务。 | |
Dispose(Boolean) | 释放对象结果使用的资源。 | |
Equals | (继承自 Object。) | |
Finalize | (继承自 Object。) | |
GetHashCode | (继承自 Object。) | |
GetNextResult<TElement> | 获取存储过程的下一个结果集。 | |
GetType | (继承自 Object。) | |
MemberwiseClone | (继承自 Object。) | |
ToString | (继承自 Object。) |
顶部
显式接口实现
名称 | 描述 | |
---|---|---|
IListSource.ContainsListCollection | IListSource.ContainsListCollection 实现。始终返回 false。 | |
IEnumerable.GetEnumerator | 返回一个循环访问查询结果的枚举器。 | |
IListSource.GetList | 以数据绑定所用的格式返回结果。 | |
IDbAsyncEnumerable.GetAsyncEnumerator | 返回一个循环访问查询结果的异步枚举器。 |
顶部
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。