Export (0) Print
Expand All

DataServiceContext Methods

The DataServiceContext type exposes the following members.

  Name Description
Public method AddLink Adds the specified link to the set of objects the DataServiceContext is tracking.
Public method AddObject Adds the specified object to the set of objects that the DataServiceContext is tracking.
Public method AddRelatedObject Adds a related object to the context and creates the link that defines the relationship between the two objects in a single request.
Public method AttachLink Notifies the DataServiceContext to start tracking the specified link that defines a relationship between entity objects.
Public method AttachTo(String, Object) Notifies the DataServiceContext to start tracking the specified resource and supplies the location of the resource within the specified resource set.
Public method AttachTo(String, Object, String) Notifies the DataServiceContext to start tracking the specified resource and supplies the location of the resource in the specified resource set.
Public method BeginExecute(Uri, AsyncCallback, Object, String, OperationParameter[]) Asynchronously sends a request to the data service to execute a specific URI.
Public method BeginExecute<TElement>(Uri, AsyncCallback, Object) Asynchronously sends the request so that this call does not block processing while waiting for the results from the service.
Public method BeginExecute<T>(DataServiceQueryContinuation<T>, AsyncCallback, Object) Asynchronously sends a request to the data service to retrieve the next page of data in a paged query result.
Public method BeginExecute<TElement>(Uri, AsyncCallback, Object, String, Boolean, OperationParameter[]) Asynchronously sends a request to the data service to execute a specific URI.
Public method BeginExecuteBatch Asynchronously submits a group of queries as a batch to the data service.
Public method BeginGetReadStream(Object, DataServiceRequestArgs, AsyncCallback, Object) Asynchronously gets the binary data stream that belongs to the specified entity, by using the specified message headers.
Public method BeginGetReadStream(Object, String, DataServiceRequestArgs, AsyncCallback, Object) Asynchronously gets a named binary data stream that belongs to the specified entity, by using the specified message headers.
Public method BeginLoadProperty(Object, String, AsyncCallback, Object) Asynchronously loads the value of the specified property from the data service.
Public method BeginLoadProperty(Object, String, DataServiceQueryContinuation, AsyncCallback, Object) Asynchronously loads the next page of related entities from the data service by using the supplied query continuation object.
Public method BeginLoadProperty(Object, String, Uri, AsyncCallback, Object) Asynchronously loads a page of related entities from the data service by using the supplied next link URI.
Public method BeginSaveChanges(AsyncCallback, Object) Asynchronously submits the pending changes to the data service collected by the DataServiceContext since the last time changes were saved.
Public method BeginSaveChanges(SaveChangesOptions, AsyncCallback, Object) Asynchronously submits the pending changes to the data service collected by the DataServiceContext since the last time changes were saved.
Public method CancelRequest Attempts to cancel the operation that is associated with the supplied IAsyncResult object.
Public method ChangeState Changes the state of the given entity. Note that the 'Added' state is not supported by this method, and that AddObject or AddRelatedObject should be used instead. If the state 'Modified' is given, calling this method is exactly equivalent to calling UpdateObject. If the state 'Deleted' is given, calling this method is exactly equivalent to calling DeleteObject. If the state 'Detached' is given, calling this method is exactly equivalent to calling Detach. If the state 'Unchanged' is given, the state will be changed, but no other modifications will be made to the entity or entity descriptor associated with it.
Public method CreateQuery<T> Creates a data service query for data of a specified generic type.
Protected method DefaultResolveType Determines the type that
Public method DeleteLink Changes the state of the link to deleted in the list of links being tracked by the DataServiceContext.
Public method DeleteObject Changes the state of the specified object to be deleted in the DataServiceContext.
Public method Detach Removes the entity from the list of entities that the DataServiceContext is tracking.
Public method DetachLink Removes the specified link from the list of links being tracked by the DataServiceContext.
Public method EndExecute(IAsyncResult) Called to complete the BeginExecute.
Public method EndExecute<TElement>(IAsyncResult) Called to complete the BeginExecute.
Public method EndExecuteBatch Called to complete the BeginExecuteBatch.
Public method EndGetReadStream Called to complete the asynchronous operation of retrieving a binary data stream.
Public method EndLoadProperty Called to complete the BeginLoadProperty operation.
Public method EndSaveChanges Called to complete the BeginSaveChanges operation.
Public method Equals (Inherited from Object.)
Public method Execute(Uri, String, OperationParameter[]) Sends a request to the data service to execute a specific URI by using a specific HTTP method.
Public method Execute<TElement>(Uri) Sends a request to the data service to execute a specific URI.
Public method Execute<T>(DataServiceQueryContinuation<T>) Sends a request to the data service to retrieve the next page of data in a paged query result.
Public method Execute<TElement>(Uri, String, Boolean, OperationParameter[]) Sends a request to the data service to execute a specific URI by using a specific HTTP method.
Public method ExecuteBatch Synchronously submits a group of queries as a batch to the data service.
Protected method Finalize (Inherited from Object.)
Public method GetEntityDescriptor Gets the EntityDescriptor for the supplied entity object.
Public method GetHashCode (Inherited from Object.)
Public method GetLinkDescriptor Gets the LinkDescriptor for a specific link that defines the relationship between two entities.
Public method GetMetadataUri Gets a URI of the location of .edmx metadata.
Public method GetReadStream(Object) Gets the binary data stream that belongs to the specified entity.
Public method GetReadStream(Object, DataServiceRequestArgs) Gets binary data stream for the specified entity by using the specified message headers.
Public method GetReadStream(Object, String) Gets the binary data stream that belongs to the specified entity, by using the specified Content-Type message header.
Public method GetReadStream(Object, String, DataServiceRequestArgs) Gets a named binary data stream that belongs to the specified entity, by using the specified Content-Type message header.
Public method GetReadStreamUri(Object) Gets the URI that is used to return a binary data stream.
Public method GetReadStreamUri(Object, String) Gets the URI that is used to return a named binary data stream.
Public method GetType (Inherited from Object.)
Public method LoadProperty(Object, String) Loads deferred content for a specified property from the data service.
Public method LoadProperty(Object, String, DataServiceQueryContinuation) Loads the next page of related entities from the data service by using the supplied query continuation object.
Public method LoadProperty(Object, String, Uri) Loads a page of related entities by using the supplied next link URI.
Public method LoadProperty<T>(Object, String, DataServiceQueryContinuation<T>) Loads the next page of related entities from the data service by using the supplied generic query continuation object.
Protected method MemberwiseClone (Inherited from Object.)
Public method SaveChanges() Saves the changes that the DataServiceContext is tracking to storage.
Public method SaveChanges(SaveChangesOptions) Saves the changes that the DataServiceContext is tracking to storage.
Public method SetLink Notifies the DataServiceContext that a new link exists between the objects specified and that the link is represented by the property specified by the sourceProperty parameter.
Public method SetSaveStream(Object, Stream, Boolean, DataServiceRequestArgs) Sets a binary data stream for the specified entity, with the specified headers in the request message.
Public method SetSaveStream(Object, Stream, Boolean, String, String) Sets a binary data stream that belongs to the specified entity, with the specified Content-Type and Slug headers in the request message.
Public method SetSaveStream(Object, String, Stream, Boolean, DataServiceRequestArgs) Sets a named binary data stream that belongs to the specified entity, with the specified headers in the request message.
Public method SetSaveStream(Object, String, Stream, Boolean, String) Sets a binary data stream for the specified entity.
Public method ToString (Inherited from Object.)
Public method TryGetEntity<TEntity> Test retrieval of an entity being tracked by the DataServiceContext by reference to the URI of the entity.
Public method TryGetUri Retrieves the canonical URI associated with the specified entity, if available.
Public method UpdateObject Changes the state of the specified object in the DataServiceContext to Modified.
Top
Show:
© 2014 Microsoft