System.Data.Objects 命名空间

System.Data.Objects 命名空间包含的类提供对对象服务的核心功能的访问。 The System.Data.Objects namespace includes classes that provide access to the core functionality of Object Services. 这些类使您可以使用实体类型实例的强类型 CLR 对象来查询、插入、更新和删除数据。 These classes enable you to query, insert, update, and delete data by working with strongly typed CLR objects that are instances of entity types. 对象服务支持针对 Entity Data Model (EDM) 中定义的类型进行的语言集成查询 (LINQ) 和 Entity SQL 查询。 Object Services supports both Language-Integrated Query (LINQ) and Entity SQL queries against types that are defined in an Entity Data Model (EDM). 对象服务将返回的数据具体化为对象,并将对象更改传播回数据源。 Object Services materializes the returned data as objects and propagates object changes back to the data source. 它还提供了跟踪更改、将对象绑定到控件以及处理并发问题的功能。 It also provides facilities for tracking changes, binding objects to controls, and handling concurrency. 有关详细信息,请参阅对象服务概述 (Entity Framework) For more information, see Object Services Overview (Entity Framework).

CompiledQuery

表示一个缓存的 LINQ to Entities 查询。Represents a cached LINQ to Entities query.

CurrentValueRecord

提供对对象数据的当前值的访问。Provides access to the current values of object data.

DbUpdatableDataRecord

提供对对象数据的原始值的访问。Provides access to the original values of object data. DbUpdatableDataRecord 实现可用于更新对象的原始值的方法。The DbUpdatableDataRecord implements methods that allow updates to the original values of an object.

EntityFunctions

提供在 LINQ to Entities 查询中,公开概念模型规范函数的公共语言运行时 (CLR) 方法。Provides common language runtime (CLR) methods that expose conceptual model canonical functions in LINQ to Entities queries. 有关规范函数的信息,请参阅规范函数For information about canonical functions, see Canonical Functions.

ObjectContext

提供用于查询和使用对象形式的实体数据的功能。Provides facilities for querying and working with entity data as objects.

ObjectContextOptions

定义影响 ObjectContext 的行为的选项。Defines options that affect the behavior of the ObjectContext.

ObjectMaterializedEventArgs

包含 ObjectMaterialized 事件的数据。Contains the data for the ObjectMaterialized event.

ObjectParameter

表示传递给对象查询的查询参数。Represents a query parameter that is passed to an object query.

ObjectParameterCollection

将查询参数表示为 ObjectParameter 中定义的 ObjectQuery<T> 对象。Represents the query parameters as ObjectParameter objects that are defined in an ObjectQuery<T>.

ObjectQuery

实现使用 LINQ to Entities 和 ObjectQuery<T> 对概念模型执行查询的通用功能。Implements common functionality for queries against a conceptual model using both LINQ to Entities and ObjectQuery<T>.

ObjectQuery<T>

表示在给定对象上下文中对概念模型的类型化查询。Represents a typed query against a conceptual model in a given object context.

ObjectResult

表示一个类,该类实现 IEnumerable 和 IDisposable。Represents a class that implements IEnumerable and IDisposable. 此类的实例返回自 ObjectQuery.Execute 方法。Instance of this class is returned from ObjectQuery.Execute method.

ObjectResult<T>

以对象的可枚举集合形式表示 ObjectQuery<T> 的结果。Represents the result of an ObjectQuery<T> as an enumerable collection of objects.

ObjectSet<TEntity>

表示用于执行创建、读取、更新和删除操作的类型化实体集。Represents a typed entity set that is used to perform create, read, update, and delete operations.

ObjectStateEntry

表示实体、实体存根或关系。Represents either an entity, entity stub or relationship.

ObjectStateManager

维护实体类型实例和关系实例的对象状态和标识管理。Maintains object state and identity management for entity type instances and relationship instances.

OriginalValueRecord

提供对对象数据的原始值的访问。Provides access to the original values of object data.

ProxyDataContractResolver

此类有助于将为持久性未知数据类创建的代理类型解析为持久性未知对象的实际类型。This class helps resolve proxy types that were created for persistence-ignorant data classes to the actual types of persistence-ignorant objects.

接口

IObjectSet<TEntity>

提供允许对一组数据对象进行修改的功能。Provides functionality to allow making modifications to a set of data objects.

枚举

MergeOption

指定加载到对象上下文中的对象与对象上下文中的已有对象的合并方式。Specifies how objects being loaded into the object context are merged with objects already in the object context.

RefreshMode

指定是保留对由对象服务跟踪的对象所做的属性更改,还是使用数据源中的属性值替换这些更改。Specifies whether property changes made to objects tracked by Object Services are kept or replaced with property values from the data source.

SaveOptions

指定在调用 SaveChanges(SaveOptions) 方法时对象上下文的行为。Specifies the behavior of the object context when the SaveChanges(SaveOptions) method is called.

委托

ObjectMaterializedEventHandler

表示将处理 ObjectMaterializedObjectContext 事件的方法。Represents the method that will handle the ObjectMaterialized event of the ObjectContext.