Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ObjectContext Methods

The ObjectContext type exposes the following members.

  NameDescription
Public method AcceptAllChanges Accepts all changes made to objects in the object context.
Public method AddObject Adds an object to the object context.
Public method ApplyPropertyChanges Applies property changes from a detached object to an object already attached to the object context.
Public method Attach Attaches an object or object graph to the object context when the object has an entity key.
Public method AttachTo Attaches an object or object graph to the object context in a specific entity set.
Public method CreateEntityKey Creates the entity key for a specific object, or returns the entity key if it already exists.
Public method CreateQuery<T> Creates an ObjectQuery<T> in the current object context by using the specified query string.
Public method DeleteObject Marks an object for deletion.
Public method Detach Removes the object from the object context.
Public method Dispose Overloaded. Releases the resources used by the object context.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method ExecuteFunction<TElement> Executes the given stored procedure or function against the data source to return an ObjectResult<T>.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetObjectByKey Returns an object that has the specified entity key.
Public method GetType Gets the type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Refresh Overloaded. Updates specific objects in the object context with data from the data source.
Public method SaveChanges Overloaded. Persists all updates to the data source.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TryGetObjectByKey Returns an object that has the specified entity key.
Top
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.