ObjectContext Methods

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Namespace:   System.Data.Objects
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

NameDescription
System_CAPS_pubmethodAcceptAllChanges()

Accepts all changes made to objects in the object context.

System_CAPS_pubmethodAddObject(String, Object)

Adds an object to the object context.

System_CAPS_pubmethodApplyCurrentValues<TEntity>(String, TEntity)

Copies the scalar values from the supplied object into the object in the ObjectContext that has the same key.

System_CAPS_pubmethodApplyOriginalValues<TEntity>(String, TEntity)

Copies the scalar values from the supplied object into set of original values for the object in the ObjectContext that has the same key.

System_CAPS_pubmethodApplyPropertyChanges(String, Object)

Obsolete. Applies property changes from a detached object to an object already attached to the object context.

System_CAPS_pubmethodAttach(IEntityWithKey)

Attaches an object or object graph to the object context when the object has an entity key.

System_CAPS_pubmethodAttachTo(String, Object)

Attaches an object or object graph to the object context in a specific entity set.

System_CAPS_pubmethodCreateDatabase()

Creates the database by using the current data source connection and the metadata in the StoreItemCollection.

System_CAPS_pubmethodCreateDatabaseScript()

Generates a data definition language (DDL) script that creates schema objects (tables, primary keys, foreign keys) for the metadata in the StoreItemCollection. The StoreItemCollection loads metadata from store schema definition language (SSDL) files.

System_CAPS_pubmethodCreateEntityKey(String, Object)

Creates the entity key for a specific object, or returns the entity key if it already exists.

System_CAPS_pubmethodCreateObject<T>()

Creates and returns an instance of the requested type .

System_CAPS_pubmethodCreateObjectSet<TEntity>()

Creates a new ObjectSet<TEntity> instance that is used to query, add, modify, and delete objects of the specified entity type.

System_CAPS_pubmethodCreateObjectSet<TEntity>(String)

Creates a new ObjectSet<TEntity> instance that is used to query, add, modify, and delete objects of the specified type and with the specified entity set name.

System_CAPS_pubmethodCreateProxyTypes(IEnumerable<Type>)

Generates an equivalent type that can be used with the Entity Framework for each type in the supplied enumeration.

System_CAPS_pubmethodCreateQuery<T>(String, ObjectParameter[])

Creates an ObjectQuery<T> in the current object context by using the specified query string.

System_CAPS_pubmethodDatabaseExists()

Checks if the database that is specified as the database in the current data source connection exists on the data source.

System_CAPS_pubmethodDeleteDatabase()

Deletes the database that is specified as the database in the current data source connection.

System_CAPS_pubmethodDeleteObject(Object)

Marks an object for deletion.

System_CAPS_pubmethodDetach(Object)

Removes the object from the object context.

System_CAPS_pubmethodDetectChanges()

Ensures that ObjectStateEntry changes are synchronized with changes in all objects that are tracked by the ObjectStateManager.

System_CAPS_pubmethodDispose()

Releases the resources used by the object context.

System_CAPS_protmethodDispose(Boolean)

Releases the resources used by the object context.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodExecuteFunction(String, ObjectParameter[])

Executes a stored procedure or function that is defined in the data source and expressed in the conceptual model; discards any results returned from the function; and returns the number of rows affected by the execution.

System_CAPS_pubmethodExecuteFunction<TElement>(String, MergeOption, ObjectParameter[])

Executes the given stored procedure or function that is defined in the data source and expressed in the conceptual model, with the specified parameters, and merge option. Returns a typed ObjectResult<T>.

System_CAPS_pubmethodExecuteFunction<TElement>(String, ObjectParameter[])

Executes a stored procedure or function that is defined in the data source and mapped in the conceptual model, with the specified parameters. Returns a typed ObjectResult<T>.

System_CAPS_pubmethodExecuteStoreCommand(String, Object[])

Executes an arbitrary command directly against the data source using the existing connection.

System_CAPS_pubmethodExecuteStoreQuery<TElement>(String, Object[])

Executes a query directly against the data source that returns a sequence of typed results.

System_CAPS_pubmethodExecuteStoreQuery<TEntity>(String, String, MergeOption, Object[])

Executes a query directly against the data source and returns a sequence of typed results. Specify the entity set and the merge option so that query results can be tracked as entities.

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetKnownProxyTypes()

Returns all the existing proxy types.

System_CAPS_pubmethodGetObjectByKey(EntityKey)

Returns an object that has the specified entity key.

System_CAPS_pubmethodSystem_CAPS_staticGetObjectType(Type)

Returns the entity type of the POCO entity associated with a proxy object of a specified type.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodLoadProperty(Object, String)

Explicitly loads an object related to the supplied object by the specified navigation property and using the default merge option.

System_CAPS_pubmethodLoadProperty(Object, String, MergeOption)

Explicitly loads an object that is related to the supplied object by the specified navigation property and using the specified merge option.

System_CAPS_pubmethodLoadProperty<TEntity>(TEntity, Expression<Func<TEntity, Object>>)

Explicitly loads an object that is related to the supplied object by the specified LINQ query and by using the default merge option.

System_CAPS_pubmethodLoadProperty<TEntity>(TEntity, Expression<Func<TEntity, Object>>, MergeOption)

Explicitly loads an object that is related to the supplied object by the specified LINQ query and by using the specified merge option.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodRefresh(RefreshMode, IEnumerable)

Updates a collection of objects in the object context with data from the data source.

System_CAPS_pubmethodRefresh(RefreshMode, Object)

Updates an object in the object context with data from the data source.

System_CAPS_pubmethodSaveChanges()

Persists all updates to the data source and resets change tracking in the object context.

System_CAPS_pubmethodSaveChanges(Boolean)

Obsolete. Persists all updates to the data source and optionally resets change tracking in the object context.

System_CAPS_pubmethodSaveChanges(SaveOptions)

Persists all updates to the data source with the specified SaveOptions.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodTranslate<TElement>(DbDataReader)

Translates a DbDataReader that contains rows of entity data to objects of the requested entity type.

System_CAPS_pubmethodTranslate<TEntity>(DbDataReader, String, MergeOption)

Translates a DbDataReader that contains rows of entity data to objects of the requested entity type, in a specific entity set, and with the specified merge option.

System_CAPS_pubmethodTryGetObjectByKey(EntityKey, Object)

Returns an object that has the specified entity key.

Return to top
Show: