[]
Defines a scope of data access. Provides facilities to create client views.
public class ClientScope : IDisposable
Usually, one scope is created per form/window. Entities pinned to the scope (marked as needed) are not evicted from the cache until the scope is disposed or collected by the garbage collector.
This class is a base class for platform-specific scopes, such as C1.Data.Entities.EntityClientCache (Entity Framework) and C1.Silverlight.Data.RiaServices.RiaClientCache (RIA Services).
Name | Description |
---|---|
ClientScope(ClientCacheBase) | Initializes a new instance of ClientScope class with the given ClientCacheBase. |
Name | Description |
---|---|
ClientCache | Gets the ClientCacheBase to which this client scope is connected. |
Name | Description |
---|---|
AddRef(object) | Marks an entity as needed. Needed entities are not detached/released from the context until the client scope is disposed. |
AddRef(Type) | Mark all entities of a given type as needed. All entities of that type will not be detached from the context until the client scope is disposed. |
Dispose() | Marks the scope as disposed. Entities that were marked needed by a disposed scope may be disposed of (evicted from the cache, detached from context) unless they are needed by other active scopes. |
Release(object) | Unmark a needed entity. |
Release(Type) | Unmark a needed entity type. Calling this method does not release memory. |