Export (0) Print
Expand All

ObjectContext Members

.NET Framework 3.5

Provides facilities for querying and working with entity data as objects.

The ObjectContext type exposes the following members.

  NameDescription
Public method ObjectContext Overloaded. Initializes a new instance of the ObjectContext class.
Top

  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

  NameDescription
Public property CommandTimeout Gets or sets the timeout value, in seconds, for all object context operations.
Public property Connection Gets the connection used by the object context.
Public property DefaultContainerName Gets or sets the default container name.
Public property MetadataWorkspace Gets the metadata workspace used by the object context.
Public property ObjectStateManager Gets the object state manager used by the object context to track object changes.
Top

  NameDescription
Public event SavingChanges Occurs when changes are saved to the data source.
Top

Community Additions

ADD
Show:
© 2014 Microsoft