The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.

CachedDataStoreClient Class

A cached data store provider (an ICachedDataStore implementation) for client applications transferring data via WCF.

Namespace: DevExpress.Xpo.DB

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public class CachedDataStoreClient :
    CachedDataStoreClientBase<ICachedDataStoreWarpService>
Public Class CachedDataStoreClient
    Inherits CachedDataStoreClientBase(Of ICachedDataStoreWarpService)
public class CachedDataStoreClient :
    CachedDataStoreClientBase<ICachedDataStoreWarpService>
Public Class CachedDataStoreClient
    Inherits CachedDataStoreClientBase(Of ICachedDataStoreWarpService)

Remarks

CachedDataStoreClient objects are automatically created to maintain a cache (DataCacheNode) on the client side when you create a data layer via the XpoDefault.GetDataLayer method call and pass a connection string to a service (an ICachedDataStoreService implementor, such as a CachedDataStoreService descendant) as a method parameter.


// Sample WCF service connection string.
string connectionString = "http://localhost:64466/Service.svc";

// GetDataLayer automatically creates 
// a cached data store provider (and a cache) based on the connection string.
XpoDefault.DataLayer = XpoDefault.GetDataLayer(connectionString, AutoCreateOption.DatabaseAndSchema);
XpoDefault.Session = null;

If you are going to create a cache hierarchy at the client, you can manually create CachedDataStoreClient objects as shown below.


// Specifying the name of the endpoint in the client application's configuration file.
string bindingName = "...";

// Creating a cache (a node starting a cache hierarchy at the client).
DataCacheNode node = new DataCacheNode(new CachedDataStoreClient(bindingName));
// Checking connection.
node.ProcessCookie(DataCacheCookie.Empty);

XpoDefault.DataLayer = new SimpleDataLayer(node);
XpoDefault.Session = null;

For more information on transferring data via WCF services, refer to Transferring Data via WCF Services.

Inheritance

Object
ClientBase<ICachedDataStoreWarpService>
DevExpress.Xpo.DB.DataStoreClientBase<ICachedDataStoreWarpService>
DevExpress.Xpo.DB.CachedDataStoreClientBase<ICachedDataStoreWarpService>
CachedDataStoreClient
See Also